Hi,
I have a modal dialog started by a main window. When I press a certain button on this modal dialog, I want the dialog to close. After that, the main window should open a second modal dialog.
I tried to first close() the first modal dialog in the event handler of the button in that dialog, and send a signal to the mainwindow.
Qt Code:
void CDekInfo::on_pbScan_clicked() { close(); emit startSecondDialog( "123456789" ); }To copy to clipboard, switch view to plain text mode
But of course the signal is handled immediately by the mainwindow and the second dialog is opened immediately, which is no good because the code after the exec() of my first modal dialog has to be executed before the second one is opened.
Is there a way to 'post' a signal so that it will be executed only after my modal form has finished closing ? Sort of like when my main window enters its event loop again ?
Regards,
Marc
Bookmarks