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



  • 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!


  • Lifetime Qt Champion

    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



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

    Thank you!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.