PDA

View Full Version : Application fails to load gif/jpeg graphic on PC without QT



kompotFX
29th April 2010, 11:28
QT4.6.1
QtCreator 1.3.1
windows 7, windows XP

In my application I'm loading graphic using qrc file: e.g. setPixmap(QPixmap(tr(":wndicons/close_icon.gif")));
All works fine on machine where I have QT installed.

When I try to run my app on "clean" PC it fails even if I copy all possible qt dlls to my application exe folder including qgif4.dll. The program runs fine but showing only png images. What Im missing here?

kompotFX
29th April 2010, 12:41
the problem solved!

qgif4.dll have to be placed in subfolder "imageformats" :)

squidge
29th April 2010, 12:41
Maybe you should put them in the plugins directory instead :-)

borisbn
29th April 2010, 15:18
Maybe you should put them in the plugins directory instead :-)
Quote from Deploying an Application on Windows (http://doc.qt.nokia.com/4.6/deployment-windows.html)

note that each type of plugin should be located within a specific subdirectory (such as imageformats or sqldrivers) within your distribution directory