You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Thursday, April 19th 2007, 9:06am

Can't display .jpg,.jpeg file in my QT app

Hi all,

I am loading a .jpg file in my QT application and displaying it on paintEvent() of the app.
When i run this app on my machine having QT VS 2003.NET integrated is installed, it works just fine.
But when i run it in a fresh machine Windows XP where QT is not installed, i doesn't show me .jpg file.

Can anybody tell me whats wrong i have done????


1. I have added QtCore4.dll, QtGui4.dll, and qjpeg1.dll.
2. I tried to use "qjpeg1.dll" by placing it in current app directory and also in "CurrentDir\plugins\imageformats" but this .dll doesn't get loaded by Windows.
3. I also loaded this .dll after user opens a .jpg file. I can see that dll got loaded but nothing happens.

Anyways i suppose that this "qjpeg1.dll" should be loaded automatically when it is required but its not happening in my case.

I know that this dll is the only culprit but i don't know what i have to do.

i also create a qt.conf file in which i wrote:

Prefix = .\

but it doesn't help.

i got hint to do this from this link.

May be i am not able to understand what has been said.
Can please somebody tell me what i should do to make it work.

Any help would be appreciated.
Thanks in advance. :)