Hello, I have a very odd problem.
During the start-up of my application, I do some checks to see whether the plugins were loaded properly, etc. All these checks happen in the constructor of the MainWindow (descendant of QMainWindow) and when some of them fails, I want to close the application. However, using QApplication::close(), close(), qApp->quit() or destroy() has no effect (or, at least it does not close the application, I am not aware of any other side-effects), the MainWindow shows up (and later my application crashes because it assumes the plugins are already loaded).
My closeEvent() is reimplemented,
workspace->closeAllWindows();
if (activeWindow()) {
event->ignore();
} else {
event->accept();
}
}
void MainWindow::closeEvent(QCloseEvent *event){
workspace->closeAllWindows();
if (activeWindow()) {
event->ignore();
} else {
event->accept();
}
}
To copy to clipboard, switch view to plain text mode
but I think that the problem is elswhere, because I checked that the event->accept() line is called.
Do you have any ideas how to close the application?
Thanks...
Bookmarks