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



  • 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.



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



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



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



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



  • [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.

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.