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>
bb10
Richard Moe Gustavsen 2017-03-30 11:05:32 +02:00
parent 84b114e4f3
commit b99ec4b4ec
1 changed files with 3 additions and 1 deletions

View File

@ -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