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.