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] enum QtSvg::Option
flags QtSvg::Options
该枚举包含一些标志,可用于启用或禁用SVG文件解析和渲染的各项功能。多个标志可以组合成QFlags 类型QtSvg::Options。
| 常量 | 值 | 描述 |
|---|---|---|
QtSvg::NoOption | 0x00 | 空值。这是 QtSvg::Options 的默认值。 |
QtSvg::Tiny12FeaturesOnly | 0x01 | 严格且仅解析属于SVG 1.2 TinyStatic 功能集的标签。 |
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> 的 typedef。它存储 Option 值的按“或”运算组合。
© 2026 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.