PDA

View Full Version : Loading SVGs in QIcon



adam_d
13th October 2007, 13:31
Hi,

I'm trying to use svg images with qicon (qt4.3), like this:

midiButton->setIcon(QIcon(":/images/preferences/controllers.svg"));

This works fine on Linux but on Windows fails silently. The resources are definitely compiled in properly. I understand svg rendering is handled by a plugin, the Qt docs seem to imply loading this should happen automatically but is there something special I need to do?

Thanks for any pointers,

Adam

wysota
13th October 2007, 13:33
Check your plugins/iconengines folder of the Qt installation if there is the svg plugin there.