Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to deploy when using Resource System? (Windows 10)
Forum Update on Monday, May 27th 2025

How to deploy when using Resource System? (Windows 10)

Scheduled Pinned Locked Moved Solved Installation and Deployment
11 Posts 2 Posters 980 Views
  • 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.
  • Ijon_TichiI Offline
    Ijon_TichiI Offline
    Ijon_Tichi
    wrote on last edited by Ijon_Tichi
    #1

    Hello,
    i am new with Qt and heve develop my first program.

    Now i want to run my program stand alone without the Qt Creator.

    I put
    libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll
    Qt5Core.dll, Qt5Gui.dll, Qt5Widgets.dll
    and the plugin folders
    imageformats, platforms, printsupport, styles
    into the working directory.

    The program is nearly fine, but the images, that i put into Qt Resource System will only shown when its start throw the Qt Creator.
    Wenn it is start direct from the working directory the images are not shown, all other work, but not the images from the Qt Resource System.

    I use Qt5.14.0, mingw73_64, Windows 10

    what can i do?
    Ijon

    1 Reply Last reply
    1
    • Ijon_TichiI Offline
      Ijon_TichiI Offline
      Ijon_Tichi
      wrote on last edited by
      #8

      thanks jsulm,
      yes, i readed this many time but i unterstand it not full, i am a beginner in Qt.
      The windeployqt doesn't tell what plug-ins is needed.
      Even when i copy all plug-ins folders into the working directory my jpg-files are not loaded.
      Maybe there is a format problem to my jpg-files

      I think, i have the needed plug-in to handle jpg, all I/O opterations (store, ..) with jpg that are calculated by the program works.

      Wenn i use *.png images in the QRessource System it works fine, even from cmd.exe
      So i have changed to the *.png format.

      to me it is all fine, further i use png format

      thanks jsulm to your help

      Ijon

      jsulmJ 1 Reply Last reply
      0
      • Ijon_TichiI Offline
        Ijon_TichiI Offline
        Ijon_Tichi
        wrote on last edited by Ijon_Tichi
        #2

        windeployqt Output:

        D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release>windeployqt --release JACK-Tool.exe
        D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release\JACK-Tool.exe 64 bit, release executable
        Direct dependencies: Qt5Core Qt5Gui Qt5Widgets
        All dependencies : Qt5Core Qt5Gui Qt5Widgets
        To be deployed : Qt5Core Qt5Gui Qt5Widgets
        Unable to find the platform plugin.

        the .pro file contains:

        RESOURCES += \
        jack-ressourcen.qrc

        jsulmJ 1 Reply Last reply
        0
        • Ijon_TichiI Ijon_Tichi

          windeployqt Output:

          D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release>windeployqt --release JACK-Tool.exe
          D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release\JACK-Tool.exe 64 bit, release executable
          Direct dependencies: Qt5Core Qt5Gui Qt5Widgets
          All dependencies : Qt5Core Qt5Gui Qt5Widgets
          To be deployed : Qt5Core Qt5Gui Qt5Widgets
          Unable to find the platform plugin.

          the .pro file contains:

          RESOURCES += \
          jack-ressourcen.qrc

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #3

          @Ijon_Tichi Usually resources are built into the executable, so it should work. See "Compiled-In Resources" in https://doc.qt.io/qt-5/resources.html
          Can you show how you're using your resources?
          Also, do you see any warnings when you start your app from cmd.exe?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • Ijon_TichiI Offline
            Ijon_TichiI Offline
            Ijon_Tichi
            wrote on last edited by
            #4

            hello jsulm

            i use a *.qrc (jack-ressourcen.qrc) over the Qt Creator
            <RCC>
            <qresource prefix="/images">
            <file>ressourcen/jack-logo.jpg</file>
            <file>ressourcen/Startbild.jpg</file>
            <file>ressourcen/JACK-mittel.jpg</file>
            <file>ressourcen/JACK-groß.jpg</file>
            </qresource>
            </RCC>

            in the source code i use the ressources

            ...
            QImage imageLogo(":/images/ressourcen/jack-logo.jpg","JPG");
            ...
            ui->label_imageLogo->setPixmap(QPixmap::fromImage(imageLogo));
            ...

            When i rum with Qt Creator (debug or relase) it works the imageLogo is displayed.

            Whan i run from cmd.exe there ist no error, the program works, but the imageLogo is not shown.

            A image, that i generate by QPainter thru the Program is shown, there no problem running from CMD :
            ...
            QImage imageSchablone(2480, 3508, QImage::Format_RGB32);
            ...
            // calculating the image
            imageSchablone = aktSchablone.berechnen(aktuellerTonarm);
            ....
            // show the image
            // PixMapSchablone is a lable on the ui
            ui->PixMapSchablone->setPixmap( QPixmap::fromImage(imageSchablone).scaledToHeight(900));
            ...

            1 Reply Last reply
            0
            • Ijon_TichiI Offline
              Ijon_TichiI Offline
              Ijon_Tichi
              wrote on last edited by
              #5

              I have testet with aditional images in the QRessource System.
              The progam.exe get bigger, so i think the images are link into the program.

              ... but the the images are not shown when i rum from cmd.exe

              1 Reply Last reply
              0
              • Ijon_TichiI Offline
                Ijon_TichiI Offline
                Ijon_Tichi
                wrote on last edited by
                #6

                also show a image direct from file only work when run from Qt Creator (Debug or Release), wenn run from cmd.exe the image is not shown.
                ...
                QImage imageStartSeite("D:\QT-Creator-Projekte\JACK-Tool\Startbild.jpg","JPG");
                ...

                jsulmJ 1 Reply Last reply
                0
                • Ijon_TichiI Ijon_Tichi

                  also show a image direct from file only work when run from Qt Creator (Debug or Release), wenn run from cmd.exe the image is not shown.
                  ...
                  QImage imageStartSeite("D:\QT-Creator-Projekte\JACK-Tool\Startbild.jpg","JPG");
                  ...

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #7

                  @Ijon_Tichi I think your problem is that you do not deploy your app properly before starting outside of QtCreator, so it can't find needed plug-in.
                  See https://doc.qt.io/qt-5/windows-deployment.html

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • Ijon_TichiI Offline
                    Ijon_TichiI Offline
                    Ijon_Tichi
                    wrote on last edited by
                    #8

                    thanks jsulm,
                    yes, i readed this many time but i unterstand it not full, i am a beginner in Qt.
                    The windeployqt doesn't tell what plug-ins is needed.
                    Even when i copy all plug-ins folders into the working directory my jpg-files are not loaded.
                    Maybe there is a format problem to my jpg-files

                    I think, i have the needed plug-in to handle jpg, all I/O opterations (store, ..) with jpg that are calculated by the program works.

                    Wenn i use *.png images in the QRessource System it works fine, even from cmd.exe
                    So i have changed to the *.png format.

                    to me it is all fine, further i use png format

                    thanks jsulm to your help

                    Ijon

                    jsulmJ 1 Reply Last reply
                    0
                    • Ijon_TichiI Ijon_Tichi

                      thanks jsulm,
                      yes, i readed this many time but i unterstand it not full, i am a beginner in Qt.
                      The windeployqt doesn't tell what plug-ins is needed.
                      Even when i copy all plug-ins folders into the working directory my jpg-files are not loaded.
                      Maybe there is a format problem to my jpg-files

                      I think, i have the needed plug-in to handle jpg, all I/O opterations (store, ..) with jpg that are calculated by the program works.

                      Wenn i use *.png images in the QRessource System it works fine, even from cmd.exe
                      So i have changed to the *.png format.

                      to me it is all fine, further i use png format

                      thanks jsulm to your help

                      Ijon

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #9

                      @Ijon_Tichi So, did you actually use windeployqt tool? It should copy the plug-in. Also, the plugins need to bi in a subdirectory as shown in the above link in an example:

                      The executable	plugandpaint.exe
                      The Basic Tools plugin	plugins\pnp_basictools.dll
                      The ExtraFilters plugin	plugins\pnp_extrafilters.dll
                      The Qt Windows platform plugin	platforms\qwindows.dll
                      The Qt Windows Vista style plugin	styles\qwindowsvistastyle.dll
                      The Qt Core module	Qt5Core.dll
                      The Qt GUI module	Qt5Gui.dll
                      The Qt Widgets module	Qt5Widgets.dll
                      

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • Ijon_TichiI Offline
                        Ijon_TichiI Offline
                        Ijon_Tichi
                        wrote on last edited by
                        #10

                        as i wrote in Post 1

                        i put

                        libgcc_s_seh-1.dll 
                        libstdc++-6.dll 
                        libwinpthread-1.dll
                        Qt5Core.dll 
                        Qt5Gui.dll 
                        Qt5Widgets.dll
                        

                        and the plugin folders

                        imageformats
                        platforms
                        printsupport
                        styles
                        

                        into the working directory.

                        but even when i copy all plug-in folders into the working directory there is the trouble with the jpg.

                        where can i find information, what plug-ins more than "imageformats" are needed to handle jpg?

                        as i wrote in post 2 i use the windeployqt tool, i have set the env (qtenv2.bat) bevor:

                        windeployqt Output:

                        D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release>windeployqt --release JACK-Tool.exe
                        D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release\JACK-Tool.exe 64 bit, release executable
                        Direct dependencies: Qt5Core Qt5Gui Qt5Widgets
                        All dependencies : Qt5Core Qt5Gui Qt5Widgets
                        To be deployed : Qt5Core Qt5Gui Qt5Widgets
                        Unable to find the platform plugin.
                        

                        searching to the error message "Unable to find the platform plugin", i doesn't found a solution

                        I thing the ressource system work fine. By using png format it works fine.

                        1 Reply Last reply
                        0
                        • Ijon_TichiI Offline
                          Ijon_TichiI Offline
                          Ijon_Tichi
                          wrote on last edited by
                          #11

                          @Ijon_Tichi said in How to deploy when using Resource System? (Windows 10):

                          Unable to find the platform plugin.

                          To solve the problem with the windeployqt i downloaded the windeployqt64releaseonly.exe from here: http://tripleboot.org/Uploads/windeployqt64releaseonly.zip

                          Discussion here:
                          https://forum.qt.io/topic/109779/windeployqt-exe-comes-with-qt-5-14-not-copy-the-dlls-to-the-app-directory/8

                          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