diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2017-03-30 11:05:32 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2017-04-05 11:59:58 +0000 |
commit | b99ec4b4ec7c80f72c65a73ba383f6d9e3f460c8 (patch) | |
tree | 856f52e4ffb7353f2c1be69724a74f1e38a38dcc /src | |
parent | 84b114e4f310c787c7b1d2ac0edfbdb9d943fcc6 (diff) |
Docs: add platform notes to QSystemTrayIcon
On macOS, DoubleClick will work if there is no context menu set.
Otherwise, the context menu will open on the first mouse
press, and then steal focus (which is native behavior).
This means that we never get a callback from the OS for
the second click.
Since it sounds strange to attach a context menu, and at the
same time, listen for double click, we choose here to follow
native behavior and open the menu straight away.
Task-number: QTBUG-5770
Change-Id: I14e08bb8ccd330eecc98e332d54ce4e551cd78fb
Reviewed-by: Jeremy Whiting <jpwhiting@kde.org>
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/util/qsystemtrayicon.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp index 1e0d2ab857..55814d0e21 100644 --- a/src/widgets/util/qsystemtrayicon.cpp +++ b/src/widgets/util/qsystemtrayicon.cpp @@ -323,7 +323,9 @@ bool QSystemTrayIcon::event(QEvent *e) \value Unknown Unknown reason \value Context The context menu for the system tray entry was requested - \value DoubleClick The system tray entry was double clicked + \value DoubleClick The system tray entry was double clicked. \note On macOS, a + double click will only be emitted if no context menu is set, since the menu + opens on mouse press \value Trigger The system tray entry was clicked \value MiddleClick The system tray entry was clicked with the middle mouse button |