Restore Mac Application Window after Cmd-H: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:HowTo]] | [[Category:HowTo]] | ||
[[Category:snippets]] | |||
= How to restore an OS X application window after hiding with Cmd-H = | = How to restore an OS X application window after hiding with Cmd-H = | ||
Line 5: | Line 6: | ||
If you have hidden an OS X Application with Cmd-H (aka Apple-H = ⌘-H) the hidden window cannot be shown again by calling slot show(). In this case you must call | If you have hidden an OS X Application with Cmd-H (aka Apple-H = ⌘-H) the hidden window cannot be shown again by calling slot show(). In this case you must call | ||
<code> | <code> | ||
raise(); | |||
// maybe additionally to activate the window: | |||
activateWindow(); | |||
</code> | |||
If you have installed a system tray icon with "QSystemTrayIcon":http://doc.qt.nokia.com/stable/qsystemtrayicon.html you can add a menu entry and connect the "QAction's":http://doc.qt.nokia.com/stable/qaction.html triggered() signal with the respecitve slots. | If you have installed a system tray icon with "QSystemTrayIcon":http://doc.qt.nokia.com/stable/qsystemtrayicon.html you can add a menu entry and connect the "QAction's":http://doc.qt.nokia.com/stable/qaction.html triggered() signal with the respecitve slots. |
Revision as of 11:42, 25 February 2015
How to restore an OS X application window after hiding with Cmd-H
If you have hidden an OS X Application with Cmd-H (aka Apple-H = ⌘-H) the hidden window cannot be shown again by calling slot show(). In this case you must call
raise();
// maybe additionally to activate the window:
activateWindow();
If you have installed a system tray icon with "QSystemTrayIcon":http://doc.qt.nokia.com/stable/qsystemtrayicon.html you can add a menu entry and connect the "QAction's":http://doc.qt.nokia.com/stable/qaction.html triggered() signal with the respecitve slots.