Resources from promoted widgets do not appear in main application (designer question)
-
wrote on 1 Dec 2010, 17:31 last edited by
Hello,
I've got two ui's in my project, a main window, with a simple menu and a placeholder QWidget. I've promoted the QWidget placeholder to my derived QWidget class and load it correctly in the main. The custom widget is a collection of standard widgets (buttons, etc). (I do have to manually connect a few signals/slots, but that's not a problem). When I run the application, the custom widget shows up correctly in the placeholder's location and all the buttons, etc work correctly. The only issue I'm having is that the button icons on the derived QWidget do not show up. I've added the resources that contain the icons to both forms in designer. When I'm editing the derived widget's UI, the icons show up correctly. But they do not show up when the main app is run.
Any thoughts? I don't mind loading them by hand, I guess, but it seems like I should be able to load them directly into the binary like standard resources.
Thanks for any responses.
-
wrote on 1 Dec 2010, 18:20 last edited by
There should be a resource file (.qrc) created with Designer. Did you add this to your application (RESOURCES variable in your .pro file)?
-
wrote on 1 Dec 2010, 18:40 last edited by
Ha! That was it - you're a genius! Thanks. I can't believe I missed that. :)
-
wrote on 1 Dec 2010, 18:47 last edited by
uhm... too much glory for that little hint - but thanks, anyway :-)
1/4