QSVGRenderer - subclassing & replacing with custom renderer possible?
-
So I was very happy when I noticed there is SVG support in qt \o/ !
But - rollercoaster, it seems the support is limited to some older standard (2008 /o\
https://stackoverflow.com/questions/64276963/qt-qml-svg-filters-e-g-fegaussianblur-support-in-qt5-12-and-up )!
Since we have very fancy designers, who work with alot of effects (for example feGaussianBlur) ,
their SVGs are very much colorful and plenty of effects are applied.Now, of course I can fallback to PNG, but rather not (due to limitations of raster formats).
So hence the question : can I replace / unplug the default SVG rendering mechanism in qml somehow;
for example with something like this one :
https://github.com/cppfw/svgrenAnd if so, what would be the best mean to do so?
-
Hi,
If you can generate something that you can put in a QImage, you could create a custom image provider for your QML application.
The other option is to create your own Qt image format plugin to load these SVG files using the tools you want.
-
Thanks, as a reference, ill add here
https://doc.qt.io/qt-5/qtimageformats-index.html