Hi all.
I have an application that works with databases. Before it starts executing it shows a dialog that asks for the connection parameters (user, password). I'd like to make that when a user presses the Cancel button, the application must quit.
For example:
//-------------------------//
int ret = ConnDialog.exec();
app.quit();
//-------------------------//
app.exec(); // Here starts the main loop
//-------------------------//
//-------------------------//
int ret = ConnDialog.exec();
if (ret == QDialog::Rejected)
app.quit();
//-------------------------//
app.exec(); // Here starts the main loop
//-------------------------//
To copy to clipboard, switch view to plain text mode
But it doesn't work. The QApplication::quit() works only inside the main loop.
How can i quit the application before the main loop ? Thnx ...
Bookmarks