QtSvg rendering without a SVG file ?
Solved
General and Desktop
-
Can anyone point me to a tutorial on how to use QtSvg to render content without an SVG file?
In my application I already have XML which defines a lot of how the application works. I have added SVG to the XML file. I have read this SVG in along with the rest of the XML, is there a way to use the QtSvg classes and send the SVG to the classes without reading it from file?
Thank you,
-
Hi
you can use
https://doc.qt.io/qt-5/qsvgrenderer.html
and
https://doc.qt.io/qt-5/qsvgrenderer.html#QSvgRenderer-2
which takes a QByteArray with the SVG data -
Hi
you can use
https://doc.qt.io/qt-5/qsvgrenderer.html
and
https://doc.qt.io/qt-5/qsvgrenderer.html#QSvgRenderer-2
which takes a QByteArray with the SVG data