Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

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

    General and Desktop
    4
    6
    2463
    Loading More Posts
    • 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
      Jufa last edited by

      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 Reply Quote 0
      • S
        Sam last edited by

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

        1 Reply Last reply Reply Quote 0
        • H
          Hostel last edited by

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

          1 Reply Last reply Reply Quote 0
          • Q
            qxoz last edited by

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

            1 Reply Last reply Reply Quote 0
            • J
              Jufa last edited by

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

              1 Reply Last reply Reply Quote 0
              • S
                Sam last edited by

                [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 Reply Quote 0
                • First post
                  Last post