Search code examples
macosqtsystem-tray

Detect clicks on SystemTray applications


I have an app with a widget that must when the user clicks anywhere outside the aforementioned widget. The problem is that the widget doesn't get any focus out signals when the user clicks in the SystemTray (for example the Skype or dropbox desktop app or the clock).

How can i capture the clicks in the SystemTray icons or make the widget to lose focus in that case?

Im using Qt 5.3 in a mac os Yosemite.

Thx in advance


Solution

  • I was unable to find a solution for this problem inside QT so i detected clicks with the Mac Api and when the click came from outside the application window it hides.