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. Stay active in the dock on OS X when closed
Forum Updated to NodeBB v4.3 + New Features

Stay active in the dock on OS X when closed

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.1k 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.
  • D Offline
    D Offline
    dagheyman
    wrote on last edited by dagheyman
    #1

    I'm developing a Qt program with a "close to system tray" option. When this option is enabled, the window actually hides when the window is closed. On OS X, the program icon then stays in the dock menu, as well as in the system tray. The hidden window doesn't seem to automatically be visible again when pressing the dock icon.

    Most applications on OS X (Chrome, Slack etc.) doesn't actually closes when the last window is closed, instead they stay active in the dock. A press on the dock icon will give back a window.

    Is it possible to have the same behaviour in Qt?

    I'm using Qt 4.8.6 with PySide bindings.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      That's feature has been implemented in Qt 5. If you're locked with Qt 4, you'll have to back port the patch.

      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
      0
      • D Offline
        D Offline
        dagheyman
        wrote on last edited by
        #3

        Thank you for your answer.
        Do you have a reference to the specific patch?

        It does seem that the solution proposed in the end of this thread seems to work for me for the time being.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You can find it here

          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
          0

          • Login

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