Please nominate your Qt Champions for 2021!

How to use new Qt Designer Form in app

  • Hi,I want to add new form to my project ,I used this way
    add new>Qt>Qt Designer Form

    And I added #include "ui_dialog.h" and Ui::Dialog *newDialog in my mainwindow.h
    I want to open a new dialog when I click on pushButton on mainwindow.ui.
    how can I do this ?


    doesn't exist

  • it's recommended you use "New Qt Designer Form Class" instead of just the form. Let Qt create the class that the form uses. it becomes much easier to deal with if the code is magically written for you :)

Log in to reply