Search code examples
macosqtqt5system-tray

Create monochromatic tray icon for OS X using QSystemTrayIcon


OS X asks apps to use a 19x19px monochomatic PDF as a tray icon in order to adapt a system default color based on the user's theme.

Use a template image to represent a menu bar extra. In General system preferences, users can change the menu bar (and Dock) to a dark appearance. [...]

Can that be done using QSystemTrayIcon?

As far as I can see the underlying QIcon class does not support PDF.


At the moment I am using a black SVG, which is displayed in pure black, causing a very unnatural appearance.

Default theme:

SVG on default theme

Dark theme:

SVG on dark theme


Solution

  • Its known issue of QT which going to be fixed in version 5.6