Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [SOLVED] Add custom QWidget to designer without a separate project

[SOLVED] Add custom QWidget to designer without a separate project

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 951 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.
  • F Offline
    F Offline
    frankiefrank
    wrote on last edited by
    #1

    I saw the article about creating custom QWidgets to be used in the designer:
    http://qt-project.org/doc/qt-5/designer-creating-custom-widgets.html

    I'm already using a promoted QWidget placeholder which works fine for runtime, but I want to know if it's possible to have my QWidget subclass correctly shown in the designer. Meaning, if my QWidget has a grid layout with several lineEdits, I want to actually see that rather than an empty QWidget.

    Also, I'd like to be able to do that without creating a separate project just for that QWidget.

    Appreciate any advice!

    "Roads? Where we're going, we don't need roads."

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK, you need to make a plugin for designer to have that. You can however have that plugin as a subproject of your project so you don't have to create a whole new.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • F Offline
        F Offline
        frankiefrank
        wrote on last edited by
        #3

        Hmm I guess for the specific situation I have it's not worth it. But good to know.

        Thank you!

        "Roads? Where we're going, we don't need roads."

        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