QPixmap and SVG

Matthieu Riegler picture Matthieu Riegler · Apr 9, 2012 · Viewed 17.5k times · Source

How would you suggest to handle svg with QPixmap?

The construct QPixmap(":/myfile.svg"); then call of scaled() does not work. The QPixmap gets pixelised.

Thx.

Answer

Yash picture Yash · Apr 29, 2016

Now there is much simpler way without needing of SVG module

QIcon("filepath.svg").pixmap(QSize())

So simple and works fine. Atleast in my case it worked.