SVG icons on a QPushButton?
Hi Qt fans,
currently I'm porting my apps to Qt4 using PyQt4(beta). Now I want to make them as much flexible for the future as possible. So I'm thinking about the use of SVG file format for all icons and conversion during runtime.
First of all, is it possible to do so? How do I have to create a QPushButton with a SVG icon (or a converted format)?
Second, does it make sense? If the application is slowing down because of runtime rendering, maybe I should continue using PNG icons...
Thanks for your help,
Juergen
Re: SVG icons on a QPushButton?
I would stick to PNG icons or implement some kind of an icon factory that would render and cache icons.
Re: SVG icons on a QPushButton?
Here you can find an icon engine plugin for Qt which allows using SVG files as native icons. It works, but you should use Qt 4.1.3 to see the icons without bad crashes and render problems caused by the qsvgrenderer. Currently there is no cache built in. Feel free to implement one ;-)
http://www.qtforum.de/forum/viewtopic.php?t=2093
Regards,
E*