QSystemTrayIcon: on macOS, hide messages when the user clicks them

This is default behavior on macOS, and also the behavior on Windows.

[ChangeLog][QtWidgets][QSystemTrayIcon] On macOS, clicking on the
message will remove the notification.

Change-Id: Ie30f7dacf478af76ccb53d16aea8f122869072c8
Fixes: QTBUG-77150
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Volker Hilsheimer 2019-08-30 13:13:15 +02:00
parent 43a1db6855
commit c66732b979
1 changed files with 1 additions and 2 deletions

View File

@ -434,8 +434,7 @@ QT_END_NAMESPACE
}
- (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification {
Q_UNUSED(center);
Q_UNUSED(notification);
[center removeDeliveredNotification:notification];
emit systray->messageClicked();
}