Stay active in the dock on OS X when closed
-
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.
-
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.
-
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.