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. Re-open ApplicationWindow when setQuitOnLastWindowClosed is false
QtWS25 Last Chance

Re-open ApplicationWindow when setQuitOnLastWindowClosed is false

Scheduled Pinned Locked Moved Unsolved General and Desktop
macosqt5.7
2 Posts 2 Posters 1.1k Views
  • 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.
  • D Offline
    D Offline
    dagheyman
    wrote on 22 Mar 2017, 08:57 last edited by A Former User
    #1

    I found the setQuitOnLastWindowClosed method, if I set it to false my application is still alive when I close the main window as expected. How do I bring the window back?

    Clicking on the Dock icon does nothing, I would want it to reopen my main window.

    Using Qt 5.7, QtQuick 2.5, macOS Sierra.

    Re: Stay active in the dock on OS X when closed

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Mar 2017, 23:23 last edited by
      #2

      Hi,

      You can react on the QGuiApplication:: applicationStateChanged signal.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      1/2

      22 Mar 2017, 08:57

      • Login

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