本页内容

Qt SVG Widgets C++ Classes

这些类是 Qt SVG 模块,为使用控件或图形元素的应用程序提供 SVG 渲染功能。更多内容...

类

QGraphicsSvgItem

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

QSvgWidget

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

详细说明

使用 CMake 构建

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

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

使用 qmake 构建

要配置 qmake,请将svgwidgets 添加到Qt 变量中:

QT += svgwidgets

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