Qt SVG Widgets C++ Classes

这些类是 Qt SVG模块的一部分,为使用部件或图形项的应用程序提供 SVG 渲染功能。更多

QGraphicsSvgItem

可用于渲染 SVG 文件内容的 QGraphicsItem

QSvgWidget

用于显示可缩放矢量图形(SVG)文件内容的小工具

详细说明

使用 CMake 构建

使用find_package()target_link_libraries() 命令定位并链接组件:

find_package(Qt6 REQUIRED COMPONENTS SvgWidgets)
target_link_libraries(mytarget PRIVATE Qt6::SvgWidgets)

使用 qmake 构建

要为 qmake 配置,请在Qt 变量中添加svgwidgets

QT += svgwidgets

© 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.