SVG 查看器範例

SVG (可伸縮嚮量圖形) 是用於描述 2D 嚮量圖形,基於 XML 的語言。Qt 提供用於在 Widget 及其它描繪設備渲染和顯示 SVG 繪製的類。此範例允許用戶加載 SVG 文件並查看它們在 QGraphicsView 使用 QGraphicsSvgItem 。基於選定的渲染器 QGraphicsView 使用 QWidget or QGLWidget as its viewport. A third render mode is also provided, where the QGraphicsView 間接繪製透過 QImage . This allows testing of drawing accuracy and performance for both the native, raster, and OpenGL paint engines.

QtSvg module documentation for more information about SVG and Qt's SVG classes.

文件: