SVG (可伸缩向量图形) 是用于描述 2D 向量图形,基于 XML 的语言。Qt 提供用于在 Widget 及其它描绘设备渲染和显示 SVG 绘制的类。
Using a Qt module's C++ API requires linking against the module library, either directly or through other dependencies. Several build tools have dedicated support for this, including CMake and qmake .
使用
find_package()
command to locate the needed module component in the
Qt6
包:
find_package(Qt6 REQUIRED COMPONENTS Svg)
target_link_libraries(mytarget PRIVATE Qt6::Svg)
更多细节,见 构建采用 CMake 概述。
To configure the module for building with qmake, add the module as a value of the
QT
variable in the project's .pro file:
QT += svg
Changes to Qt SVG lists important changes in the module API and functionality that were done for the Qt 6 series of Qt.
Qt SVG 在商业许可下是可用的来自 Qt 公司 。此外,它是可用的根据 GNU LGPL (次一般公共许可) 第 3 版 ,或 GNU GPL (一般公共许可) 第 2 版 。见 Qt 许可 进一步了解细节。
Furthermore, Qt SVG contains third party code under following permissive licenses:
| XSVG | 历史准许通知和免责声明 - 销售变体 |