QPixmap fails to load jpg file in spit of that qjepg4.dll is copied
Dear all,
I ran into a problem that using QPixmap's load()function to load jpg file works fine on my IDE machine but fails on other ones.
As suggested, I copy qjpeg4.dll to the same directory with exe file, still no effect.
Do I have to register the dll(I tried regsvr32.exe to register qjpeg4.dll, but seems it is not needed)? Anything is missing?
Thanks in advance!
Re: QPixmap fails to load jpg file in spit of that qjepg4.dll is copied
No, you need to put the JPEG plugin in the correct directory. The general layout is:
Code:
C:\Program Files\My Funky Program\
- program.exe
- QtCore4.dll
- QtGui4.dll
- ...
+ imageformats\
- qjpeg4.dll
- jgif4.dll
- ...
+ sqldrivers\
- qsqlite4.dll
Re: QPixmap fails to load jpg file in spit of that qjepg4.dll is copied
Thanks a lot for your prompt reply! Chris. I just tried as you suggest, it works!
But I still get one question at this point - generally programm will load the necessary dll files in system defined directory (or the same directory), why it does not work at this point? Is it Qt's default behavior? Thanks again!