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. Qt images don't display in deployed app
Forum Updated to NodeBB v4.3 + New Features

Qt images don't display in deployed app

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 4 Posters 1.8k Views 3 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.
  • W Offline
    W Offline
    WhatIf
    wrote on last edited by WhatIf
    #1

    I deployed an app almost successfully because the images don't show up. Here is what I did:

    created C:\Deployment
    copied the release version of MyApp.exe to C:\Deployment
    copied all the .dll files from C:\Qt\5.2.1\mingw48_32\bin to C:\Deployment
    copied all the folders from C:\Qt\5.2.1\mingw48_32\plugins to C:\Deployment
    

    The program runs fine but missing 2 images one displayed on a label and another on a button.

    I also tried creating C:\Deployment\qml\MyApp folder in which I moved the images following the direction in the link below with no success.

    https://wiki.qt.io/Deploy_an_Application_on_Windows

    The app was created using Qt Designer. After creating the label, I clicked the pixmap and browsed to the image I wanted to use. When I move the mouse pointer over the image icon next to pixmap, it displays the complete path to the image.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I don't remember if it was already available with Qt 5.2.1 but if so you should use windeployqt. That will help ease the deployment process.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      W 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        I don't remember if it was already available with Qt 5.2.1 but if so you should use windeployqt. That will help ease the deployment process.

        W Offline
        W Offline
        WhatIf
        wrote on last edited by
        #3

        @SGaist

        Still having the same problem using windeployqt. Here is what I did:

        1. Navigated to the release folder of my app and delete everything except myApp.exe

        2. Clicked : All Programs > Qt > 5.5 > MinGW 4.9.2 (32-bit) > Qt 5.5 for Desktop (MinGW 4.9.2 32 bit)

        3. change directory to the release folder of myApp.exe

        4. Typed : windeployqt.exe .

        Everything ran fine and many files and few folders where created. When I double-clicked myApp.exe, the app started fine but still missing the images.

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @WhatIf said:

          browsed to the image I wanted to use.

          Hi, where is that image located ?
          If you browse to image then the path is stored. so
          after deploy the image must be found in same path.

          It's often much better to include the images in a resource file and point to it there.

          W 1 Reply Last reply
          1
          • mrjjM mrjj

            @WhatIf said:

            browsed to the image I wanted to use.

            Hi, where is that image located ?
            If you browse to image then the path is stored. so
            after deploy the image must be found in same path.

            It's often much better to include the images in a resource file and point to it there.

            W Offline
            W Offline
            WhatIf
            wrote on last edited by
            #5

            @mrjj

            Thank you very much :)

            I researched resource file and did the necessary changes and it's now working fine.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kenchan
              wrote on last edited by
              #6

              Please remember to set this as resolved if you are happy with the solution :-)

              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