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,
Qt Code:
  1. void MainWindow::closeEvent(QCloseEvent *event){
  2. workspace->closeAllWindows();
  3. if (activeWindow()) {
  4. event->ignore();
  5. } else {
  6. event->accept();
  7. }
  8. }
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...