[SOLVED] QT5: PNG in Resource File. I see it in design time, not in runtime
-
wrote on 29 Jan 2013, 17:45 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.
-
wrote on 29 Jan 2013, 17:57 last edited by
Try to Clean , Run qmake, Rebuild/build then Run your project.
-
wrote on 29 Jan 2013, 18:05 last edited by
Are you running program outside Qt Creator and then you can't see image?
-
wrote on 30 Jan 2013, 05:02 last edited by
And maybe you done some mistakes while write the path in code.
-
wrote on 30 Jan 2013, 06:30 last edited by
What!? Incredible! Deleting the debug folder completely did the trick!
Thanks everyone! I'll tag the thread as solved. -
wrote on 30 Jan 2013, 06:37 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
- Right Click on your project in project tree ->Clean
- Right Click on your project in project tree ->Run qmake
- Right Click on your project in project tree ->Build
- Run.
2/6