PDA

View Full Version : final version can't open jpeg



93interactive
4th August 2009, 12:13
Hello,

i try to build a windows application that reads jpegs on pre built windows version of qt 4.5 (2009.03) with qt creator.

on the development system everything works fine, but as soon as i try the application on a windows with no qt installed, reading jpeg files failes.

i read the help about deployment on windows and tried the following:

copy imageformats from qt to applications dir 'imageformats'
copy imageformats from qt to applications dir 'plugins/imageformats'

both with or without adding:

a.addLibraryPath(a.applicationDirPath())

to main.cpp

still does not open jpeg images on the target system, what am i missing?

franz
5th August 2009, 21:47
Did you include the libjpeg? It should be in $(QTDIR)/plugins.

93interactive
6th August 2009, 04:46
no i didn't :rolleyes:

there are two imageformat directories in the installation, one under bin/ - which i used - and one under qt/plugins/ - which has libjpeg in

thanx!

nish
6th August 2009, 06:08
you must be using the qt sdk? rite .. if so then use the qt/plugins... one/

rexi
6th August 2009, 22:10
there are two imageformat directories in the installation, one under bin/ - which i used - and one under qt/plugins/ - which has libjpeg in

MrDeath already said it, you must use the one in qt/plugins. To clarify things for the future: what is in bin is for use by Qt Creator itself, the actual Qt your programs are built against is located in the qt subdirectory. So, when you distribute your binary and want to add the libraries required, take the ones from qt!