I have a Threaded program that runs in the background that creates one QApplication() per thread, and everytime I got a new Python Launcher icon on my dock.
Is there a way to start a QApplication() without creating a dock icon on OSX?
Thanks!
There are ways to remove/disable the dock icon. See this question: "How to hide the Dock icon"
I use this Python code (after I created the QApplication instance):
def hideMacDockIcon():
import AppKit
# https://developer.apple.com/library/mac/#documentation/AppKit/Reference/NSRunningApplication_Class/Reference/Reference.html
NSApplicationActivationPolicyRegular = 0
NSApplicationActivationPolicyAccessory = 1
NSApplicationActivationPolicyProhibited = 2
AppKit.NSApp.setActivationPolicy_(NSApplicationActivationPolicyProhibited)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With