Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Re-open ApplicationWindow when setQuitOnLastWindowClosed is false

    General and Desktop
    macos qt5.7
    2
    2
    818
    Loading More Posts
    • 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
      dagheyman last edited by A Former User

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 1
        • First post
          Last post