Qt SVG

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 .

構建采用 CMake

使用 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 概述。

采用 qmake 構建

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
					

文章和指南

範例

參考

Module Evolution

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 曆史準許通知和免責聲明 - 銷售變體