qtsvg

QSvgGenerator converts QSvgGraphicsItem to image when generating Svg

为君一笑 提交于 2020-07-21 06:10:30
问题 I have a bunch of SVG files that I've loaded them (as QGraphicsSvgItem) into a QGraphicsScene for designing and everything is Ok, now I want to save the scene into another output SVG file (including all the Svg items) with QSvgGenerator with the code below, but when it is exporting SVG items turn into images in the output file and their vectors are not anymore scalable. I'm looking forward for XML-manipulation methods if there is no direct solution with this Qt framework. QSvgGenerator

QGraphicsSvgItem positioning after rotation

ぐ巨炮叔叔 提交于 2019-12-23 04:45:25
问题 I encountered a strange issue/feature when I try to rotate a QGraphicsSvgItem object and set a position. Check the following example: I have one .svg for the sake of simplicity that is a blue rectangle. I create two QGraphicsSvgItem using the file and I rotate on of them with 90 degree. I set both of them to the same position, however the rotated one positioned 'wrongly'(maybe that is the correct behaviour). It looks like that the x,y coordinate(top-left corner) is now the top-right corner,

Unknown module(s) in QT: svg

*爱你&永不变心* 提交于 2019-11-29 02:50:00
Added QT += svg and I tried just QT += svg and greaterThan(QT_MAJOR_VERSION, 4): QT += svg to the .pro solution file and ran qmake from inside the QtCreator and got this error: error: Unknown module(s) in QT: svg Any ideas? You are lacking the installation of the the QtSvg library. Try to install them on your Ubuntu 13.10 in the following way: sudo apt-get install libqt5svg5* Debian Stretch: sudo apt install libqt5svg5-dev Fedora (courtesy of @robin-green): sudo dnf install qt5-qtsvg-devel 来源: https://stackoverflow.com/questions/21098805/unknown-modules-in-qt-svg

Unknown module(s) in QT: svg

狂风中的少年 提交于 2019-11-27 17:06:40
问题 Added QT += svg and I tried just QT += svg and greaterThan(QT_MAJOR_VERSION, 4): QT += svg to the .pro solution file and ran qmake from inside the QtCreator and got this error: error: Unknown module(s) in QT: svg Any ideas? 回答1: You are lacking the installation of the the QtSvg library. Try to install them on your Ubuntu 13.10 in the following way: sudo apt-get install libqt5svg5* 回答2: Debian Stretch: sudo apt install libqt5svg5-dev Fedora (courtesy of @robin-green): sudo dnf install qt5