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. How to put / insert copy of another ui form to MainWindow form?

How to put / insert copy of another ui form to MainWindow form?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.2k 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    Can I get an example of this ?
    (reference woudl be nice )
    All using QtCreator / QtDesigner - no code.

    Build MainWindow form - mainwindow.ui
    That is a standard QtCreator new form / template option.
    No issues.
    build another form - plain QWidget as an example
    again standard QtCreator build new "Form" option
    No issues.

    Now add "Form" as part of "MainWindow" form - graphically - no code .

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

      Hi
      For that you can use Promotion.
      https://doc.qt.io/qt-5/designer-using-custom-widgets.html

      You would insert a plain widget into mainwindow
      then right click and choose promote
      then tell the dialog the real classname and which .h file where it could be found.
      Then Creator will use that type (your class) instead and when run you will see the other class in place on the plain QWidget.

      1 Reply Last reply
      1

      • Login

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