Open a new form from MainWindow
iyustlop last edited by
I am creating a new app and I have created a two form MainWindow and addData. I need to open this second form on the event of click a button.
Could someone tell me how to open this second form?
I have tried some tutorial and some youtube videos but I haven´t found out one that can fit with my problem.
Thank very much in advanced.
Pradeep Kumar last edited by
As u mentioned u need to open the second form in click event on clicking of button, use signal and slots,
button as clicked signal, write ur own slot, call the second form show() in slot.
use connect statement.
@iyustlop What is the exact problem? You can show a QWidget based class calling http://doc.qt.io/qt-5/qwidget.html#show. If your addData window is derived from QDialog and id you want to show it as a modal window you can use http://doc.qt.io/qt-5/qdialog.html#exec