Qt Forum

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

    Resources from promoted widgets do not appear in main application (designer question)

    General and Desktop
    2
    4
    3479
    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.
    • P
      phil_s_stein 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.

      1 Reply Last reply Reply Quote 0
      • G
        goetz 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)?

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • P
          phil_s_stein last edited by

          Ha! That was it - you're a genius! Thanks. I can't believe I missed that. :)

          1 Reply Last reply Reply Quote 0
          • G
            goetz last edited by

            uhm... too much glory for that little hint - but thanks, anyway :-)

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply Reply Quote 0
            • First post
              Last post