Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] QT application shutsdown when minimized after closing related dialog
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fadekraft
    wrote on last edited by
    #1

    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);
    workEntry->show();
    workEntry->activateWindow();
    workEntry->raise();
    workEntry->setFocus();

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

    @

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

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Subst27
      wrote on last edited by
      #2

      Hello:

      look the QApplication or QGuiApplication

      setQuitOnLastWindowClosed(bool quit)

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Fadekraft
        wrote on last edited by
        #3

        Thank you very much, that did the trick!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved