Qt World Summit: Register Today!

[Solved] QT application shutsdown when minimized after closing related dialog

  • Hi everyone,

    I'm having this mind boggling problem, my application will sometimes spawn dialogs to collect information while being minimized to tray. However when I close the dialog while the main window is minimized to tray, the application will just terminate without any error or warning.

    I spawn the dialog like this:

    /* Create Dialog */
    WorkLogDialog *workEntry = new WorkLogDialog(this);

        /* Set signal */
        connect(workEntry, SIGNAL(finished(int)),
                this, SLOT(DialogClosed(int)));


    If the main window is not minimized, the problem does not occur.

  • Hello:

    look the QApplication or QGuiApplication

    setQuitOnLastWindowClosed(bool quit)

  • Thank you very much, that did the trick!

Log in to reply