QtSvg Namespace

QtSvg 命名空间包含 svg 类使用的类型。更多

头文件: #include <QtSvg>
CMake: find_package(Qt6 REQUIRED COMPONENTS Svg)
target_link_libraries(mytarget PRIVATE Qt6::Svg)
qmake: QT += svg

类型

(since 6.7) enum Option { NoOption, Tiny12FeaturesOnly, AssumeTrustedSource, DisableSMILAnimations, DisableCSSAnimations, DisableAnimations }
flags Options

详细说明

类型文档

[since 6.7] 枚举 QtSvg::Option
flags QtSvg::Options

该枚举包含可用于启用或禁用 SVG 文件解析和渲染的各种功能的标志。多个标志可以组合到QFlags 类型 QtSvg::Options。

常量描述
QtSvg::NoOption0x00空值。这是 QtSvg::Options 的默认值。
QtSvg::Tiny12FeaturesOnly0x01仅严格解析SVG 1.2 TinyStatic Feature set(SVG 1.2 微型静态特征集)中的标签。
QtSvg::AssumeTrustedSource (since Qt 6.8)0x02禁用某些检查和资源使用限制等。
QtSvg::DisableSMILAnimations (since Qt 6.9)0x10禁用 SMIL 动画。SMIL 动画是使用 <animateColor> 等元素定义的动画。
QtSvg::DisableCSSAnimations (since Qt 6.9)0x20禁用在 <style> 元素中定义的 CSS 动画。
QtSvg::DisableAnimations (since Qt 6.9)0xf0禁用所有动画。

该枚举在 Qt 6.7 中引入。

Options 类型是QFlags<Option> 的类型定义。它存储 Option 值的 OR 组合。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.