Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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 ?

    newDialog->show();
    

    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