System tray & Mac menu bar applications in PyQt


System tray applications (or menu bar applications) can be useful for making common functions or information available in a small number of clicks. For full desktop applications they're a useful shortcut to control apps without opening up the whole window.

This is a companion discussion topic for the original entry at


Thanks for the great article.
Can you tell how to add the functionality to quit the app?


You can quit the application by calling app.quit() — to add a menu option for this, create a new QAction and then connect the triggered signal to the quit slot e.g. action.triggered.connect(app.quit)


When running this application on mac, the application icon appear on the mac dock. Any idea on how to get rid of it and have juste the tray icon visible for the application ?