Results 1 to 3 of 3

Thread: QPixmap fails to load jpg file in spit of that qjepg4.dll is copied

  1. #1
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    1
    Platforms
    Unix/X11 Windows

    Default 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!

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default 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:
    Qt Code:
    1. C:\Program Files\My Funky Program\
    2. - program.exe
    3. - QtCore4.dll
    4. - QtGui4.dll
    5. - ...
    6. + imageformats\
    7. - qjpeg4.dll
    8. - jgif4.dll
    9. - ...
    10. + sqldrivers\
    11. - qsqlite4.dll
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to ChrisW67 for this useful post:

    maximin (28th October 2011)

  4. #3
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    1
    Platforms
    Unix/X11 Windows

    Default 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!

Similar Threads

  1. Replies: 4
    Last Post: 28th August 2008, 13:13
  2. custom plugin load fails...
    By raman_31181 in forum Qt Tools
    Replies: 3
    Last Post: 3rd July 2008, 09:37
  3. designer plugin fails to load
    By ModeZt in forum Qwt
    Replies: 6
    Last Post: 4th February 2008, 21:08
  4. [mac] QImage.load fails
    By snoopy67 in forum Qt Programming
    Replies: 4
    Last Post: 7th November 2007, 14:06

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.