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. [solved] Images Not Showing in Deployment.
QtWS25 Last Chance

[solved] Images Not Showing in Deployment.

Scheduled Pinned Locked Moved General and Desktop
15 Posts 6 Posters 16.1k 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.
  • K Offline
    K Offline
    khalidmushtaq65
    wrote on last edited by
    #1

    Hi,

    I have developed a small application which has some images on its UI. The images look fine during designing and previewing the form but when I run the application, images don't show..
    Please help me in this regard.

    Regards,
    Khalid Mushtaq

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      Did you remember to deploy the image format plugins?

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kkrzewniak
        wrote on last edited by
        #3

        How are you using the images? Are they compiled in the executable as resources or are You using them directly from the file system.

        Me, Grimlock, not "nice dino". ME BASH BRAINS!

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          yshurik
          wrote on last edited by
          #4
          1. you need to deploy imageformats plugins
          2. if it is Qt for visual studio you may need also include manifest file + msvc*.dll
            (and even on some systems like vista put them also in imageformats/ folder)
          1 Reply Last reply
          0
          • K Offline
            K Offline
            khalidmushtaq65
            wrote on last edited by
            #5

            I created a resource file and added images to it, then used from there but it's not displaying images.

            I am using QT SDK 1.1

            Regards,
            Khalid Mushtaq

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              [quote author="khalidmushtaq65" date="1299823755"]I created a resource file and added images to it, then used from there but it's not displaying images.

              I am using QT SDK 1.1

              Regards,
              Khalid Mushtaq[/quote]

              Does your application show images if you load them from disk or from the web?

              If not, then your problem is the distribution of your image plugins. If it does, then the problem is with the way you address your image files.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                khalidmushtaq65
                wrote on last edited by
                #7

                In the Form Designer, I created an action from the action editior and used an image to show beside that action text from the resources file..

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #8

                  You are not answering the questions that you are being asked.

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    khalidmushtaq65
                    wrote on last edited by
                    #9

                    Application doesn't show images when I load them from disk..
                    How can I fix the distribution of image plugins?

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      andre
                      wrote on last edited by
                      #10

                      Please detail the exact way in which you have your files laid out. Where is what relevant file in your distribution?

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        khalidmushtaq65
                        wrote on last edited by
                        #11

                        I have fixed the issue.. just added the resources file

                        RESOURCES = resources.qrc

                        in my .pro file..

                        Thanks all for your help.:-)

                        Regards,
                        Khalid Mushtaq

                        1 Reply Last reply
                        0
                        • K Offline
                          K Offline
                          KennedyDayala
                          wrote on last edited by
                          #12

                          Helo Team,

                          can somebody guide how to create a resource file and also how to create Sgnals and Slot and connect them through Qt creator ?

                          Never Ever Give Up

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            andre
                            wrote on last edited by
                            #13

                            You don't use signals and slots to "connect" a resource file to anything. A resource file provides a virtual file system that you can use from inside your Qt application for read-only access to your resource files. You can create such a file from Qt Creator using CTRL+N, choosing the Qt option in the bottom left list, and "Qt Resource file" from the list on the right. Files you add are accessible using the normal Qt classes (almost everywhere Qt accepts a file name) by starting the file name with ":/".

                            @
                            QImage myImage(":/images/myImage.png");
                            @
                            The above would load an image from the resources that was stored under the "images" directory in the resource.

                            1 Reply Last reply
                            0
                            • K Offline
                              K Offline
                              KennedyDayala
                              wrote on last edited by
                              #14

                              thanks..now I understood about creating and using the .qrc files..
                              let me know how to create a SLOT,Signal and to connect them using Creator IDE..

                              Never Ever Give Up

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                andre
                                wrote on last edited by
                                #15

                                Signals and slots can in a limited way be connected through the designer interface of Qt Creator. Only signals and slots inside the form you are creating (that is, between the widgets that you have put on the form) can be connected. For other signals and slots, you need to make the connections in code.

                                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