[Designer] How to make a standalone widget from some subpart of a QMainWindow ?



    • I have designed a main window form class => in terms of objects, I get something like :
      @whatever [QMainWindow]
      • centralwidget [QWidget]
        + one_tab [QTabWidget]
        + first_tab [QWidget]
        ... All the objects of the first_tab@
        I now realize that it would be convenient at run time to be able to add new tabs identical to the first one.
        => I would like to design an "autonomous" widget including all the objects of the first tab in order to be able to code something like :
        @one_tab->addTab(autonomous_w, QString());@

    How can I easily achieve this (without of course restarting the design from scratch) ?



  • OK it seems I sorted this out when discovering how to select a group of objects from the object inspector window then copy + paste in another form.


Log in to reply
 

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