Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Ressources deployment fail
Forum Updated to NodeBB v4.3 + New Features

Ressources deployment fail

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 544 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HB76
    wrote on last edited by
    #1

    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 !

    1 Reply Last reply
    0
    • gde23G Offline
      gde23G Offline
      gde23
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • H Offline
        H Offline
        HB76
        wrote on last edited by HB76
        #3

        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 ...

        Pablo J. RoginaP 1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • H Offline
            H Offline
            HB76
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • H HB76

              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 ...

              Pablo J. RoginaP Offline
              Pablo J. RoginaP Offline
              Pablo J. Rogina
              wrote on last edited by
              #6

              @HB76 can you please should your resource file?

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0
              • Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @HB76 said in Ressources deployment fail:

                I've took manually add the plugins

                use windeployqt!

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                1
                • H Offline
                  H Offline
                  HB76
                  wrote on last edited by
                  #8

                  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 !

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved