Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Resources from promoted widgets do not appear in main application (designer question)
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.7k Views
  • 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 Offline
    P Offline
    phil_s_stein
    wrote on last edited by
    #1

    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
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      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
      0
      • P Offline
        P Offline
        phil_s_stein
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

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

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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved