PDA

View Full Version : SVG QICONs not appearing after deploy (QT 4.2.2)



donmorr
29th March 2007, 13:52
Hello,
I'm having problems with the display of svg icons after I have deployed my application on a vanilla windows xp machine. On my develoment machines, Winxp and ubuntu, I don't have this issue.

The application has both svg and png icons. The png icons are displayed correctly, but as I have said, the svg icons do not display! :(

The icons are in a sub directory of the applicaion directory called icons. I set the icons as follows:

optionsPushButton->setIcon(QIcon("./icons/configure-b.svg"));
hideButton->setIcon(QIcon("./icons/down.svg"));
exitButton->setIcon(QIcon("./icons/logout.svg"));


I deploy the following dlls with the application: mingwm10.dll, QtCore4.dll, QtGui4.dll and QtXml4.dll.

Has anyone come across this before?

Cheers,
Donal

vfernandez
29th March 2007, 14:09
Looks like the program doesn't find the icons. Have you tried using QCoreApplication::applicationDirPath()?

jacek
29th March 2007, 14:16
I deploy the following dlls with the application: mingwm10.dll, QtCore4.dll, QtGui4.dll and QtXml4.dll.
It looks like you forgot about QtSvg4.dll and qsvg1.dll (the latter should be in imageformats subdirectory). Also consider using absolute paths instead of relative ones.