Important: Please read the Qt Code of Conduct -

Can’t deploy Jpeg functionality to clean machine.

  • Jpegs are fine on my developer machine, but are not supported when i deploy my application to a fresh machine. all jpeg files used in stylesheets are still built with the application's resources, but are never displayed.

    I tried deploying an "imageformats" folder, child of the executable folder, containing a "qjpeg4.dll" inside.

    I tried linking against the qjpeg4.lib in my .pro file, WITH what's specified above.

    still no good. Is there something in code I need to specify

  • I was told the proper way is to simply have "imageformats" under my executable's folder, and copy the qjpeg4.dll there. It still wouldn't work, but then I discovered it doesn't work because I am on a virtual machine (VMware fusion). On a "real" box it does work.

    How can this be ? I mean, it's a simple file/folder path thing.

  • For me it works on a VMWare machine, I really wouldn't expect this to be the cause of the problem.

    I personally have my application directories on windows setup like this:

    -- Application Dir
    +-- app.exe
    +-- plugins
    +-- imageformats
    +-- sqldrivers

    And soon after instantiation of the QApplication object, I set the library path:

    QApplication a(argc, argv),
    QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() + "/plugins");

    You should probably wrap this into some #ifdef to adjust the library path depending on the operating system.

  • Is there a way to just link the Jpeg and Gif libraries into my executable without having this be a plug-in?

Log in to reply