Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Ressources deployment fail



  • Hi everyone !

    I'm trying to deploy my app but I have a problem with all my images from my ressource file. When I run the program on my computer from Qt everything works fine, when I deploy the app on my computer it still works fine, but when I deploy the app on another computer, all my images doesn't show.

    I've put all my images in a .qrc file (I've got icons and splashscreen in svg, png and jpg format), and put all the plugins (imageformat and platform dll) in the platforms folder located in the same folder than my .exe.
    The strange thing is that I have another qrc file with translation files and it works perfectly.

    Do you have any idea of what can cause this issue ?

    Thanks !



  • What path are specifying for setting the icons in your application?
    Can you show for example the code for to show the splashscreen?



  • Here is my main :

    QApplication a(argc, argv);
    
    QPixmap pixmap(":/rsc/Splash.jpg");
    QSplashScreen *splash = new QSplashScreen(pixmap);
    splash->show();
    splash->showMessage("Loading environement",Qt::AlignRight,"#000000");
    a.processEvents();
    
    MainWindow w(language,&translator);
    w.show();
    
    splash->finish(&w);
    delete splash;
    
    return a.exec();
    

    and here an exemple of using the ressources images :

    actionQuit->setIcon(QIcon(":/rsc/Quit.png"));
    

    Everything works perfectly except when I deploy my application on another computer ...


  • Qt Champions 2019

    How do you deploy your application? You likely do not use windeployqt and therefore the image plugins (for jpg) are not deployed.



  • I've took manually add the plugins from the C:\Qt\xxx\plugins\ folder, as for the needed dll files. I've made an installator with advanced installer.



  • @HB76 can you please should your resource file?


  • Qt Champions 2019

    @HB76 said in Ressources deployment fail:

    I've took manually add the plugins

    use windeployqt!



  • I just found where the problem come from.

    I put all the plugins dll in the same folder named "platforms" in the application folder. In fact it need to be in differents folder according to there original folder.

    -> imageformats plugins needs to be in ./imageformats folder, as for all the iconengines plugins and all other ...

    Anyway, thanks for your help !


Log in to reply