QSystemTrayIcon Context menu on macOS disabled after updating to Qt5.15.2
-
Re: QSystemTrayIcon: Menu gets disabled if no window has focus
I'm facing similar problem as described in the topic above.
On macOS tray icon menu is greyed out and actions are not enabled when I click on any of them. We use Cocoa plugin and implement AppDelegate to handle dock clicks and main menu clicks. AppDelegate is set before the creation of QApplication, and the tray icon's context menu is disabled all the time (i.e. when application windows are not active or active).
It works when building with Qt5.8.0 on macOS 10.15 and macOS 11.0.
The simple tray icon context menu created in a small app works with Qt5.15.2. -
Hi and welcome to devnet,
Can you provide a minimal compilable example that shows that issue ?
-
So you mean you got it working ?
-
Then please mark you thread as solved :-)