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] QT5: PNG in Resource File. I see it in design time, not in runtime

[SOLVED] QT5: PNG in Resource File. I see it in design time, not in runtime

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 2.7k 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.
  • J Offline
    J Offline
    Jufa
    wrote on last edited by
    #1

    Hello there!

    I have a resource file containing a png file. I set a label pixmap to that image with ":/image/image/image.png". I can see that label with that background in the form design view. But, if I run the application, I can't see the background image in the label. It's like... if the program can't find that path, but the designer could.

    What's happening?

    Thanks in advance for your answers and your time.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sam
      wrote on last edited by
      #2

      Try to Clean , Run qmake, Rebuild/build then Run your project.

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

        Are you running program outside Qt Creator and then you can't see image?

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qxoz
          wrote on last edited by
          #4

          And maybe you done some mistakes while write the path in code.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jufa
            wrote on last edited by
            #5

            What!? Incredible! Deleting the debug folder completely did the trick!
            Thanks everyone! I'll tag the thread as solved.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sam
              wrote on last edited by
              #6

              [quote author="Jufa" date="1359527406"]What!? Incredible! Deleting the debug folder completely did the trick!
              Thanks everyone! I'll tag the thread as solved.[/quote]

              Yes but thats the case only when you are running your project in "Debug" mode. Generally you should follow

              1. Right Click on your project in project tree ->Clean
              2. Right Click on your project in project tree ->Run qmake
              3. Right Click on your project in project tree ->Build
              4. Run.
              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