[Solved]Restart a dialog
I want to restart a dialog (reopen). The dialog is attached to a mainwindow as modal application. Some Ideas?
Dialog::Dialog(QWidget *parent) :
//close and restart the QDialog, this Dialog is attached to another mainwindow
One of the possible ways:
Create a slot in MainWindow, let say restartDialog()
Connect it with a restartDialog() signal from the Dialog.
In a closeEvent() of the Dialog emit a signal to restart a dialog.
Another possible solution:
If Dialog is modal dialog then you can use return code from
"int QDialog::exec()":http://qt-project.org/doc/qt-5/qdialog.html#exec and and restart if return code is not one of "QDialog::DialogCode":http://qt-project.org/doc/qt-5/qdialog.html#DialogCode-enum
thanks andreyc I made it with closeEvent()!!!