
Originally Posted by
bruccutler
No - I've created a QObject based class with a slot that I call from main with QMetaObject::invokeMethod() call using Qt::QueuedConnection parameter. [...]
The main application goes on to the app.exec() call.
I see, but the solution is the is the same:
int main( int argc, char **argv ) {
app.setQuitOnLastWindowClosed( false );
...
app.setQuitOnLastWindowClosed( true );
return app.exec();
}
int main( int argc, char **argv ) {
QApplication app( argc, argv );
app.setQuitOnLastWindowClosed( false );
...
app.setQuitOnLastWindowClosed( true );
return app.exec();
}
To copy to clipboard, switch view to plain text mode
QApplication::setQuitOnLastWindowClosed()
Bookmarks