PDA

View Full Version : Trouble with QPixmap in windows 8.



Rodrigo Alves
24th November 2012, 08:41
Hey guys,

I'm having trouble to load a .JPG image using QPixmap(imagePath).
It works fine in MAC and Windows 7. But, it's not working on a Windows 8. It loads an empty image. That only happens with .JPG. Has anyone tried loading a JPG with QPixmap using windows 8?

d_stranz
25th November 2012, 00:28
Do you have the correct plugin for reading JPG files installed along with your application? Without plugins, only a small number of image formats is internally supported by Qt. All others require a plugin, which has to be installed in the correct location with respect to your application (usually in a plugins/imageformats folder inside the folder where your app lives).

On a development machine, Qt will look in Qt's main installation folder for plugins, so this can explain why your app works on some machines and not others. If you don't have a Qt development environment installed on the Windows 8 machine, then Qt has no default place to look for plugins.