开发者

How to hide a PyQt application's icon from Mac OS X dock

How do I make a PyQt application (wit开发者_如何学Pythonh which the user interacts solely via the system tray (in the Menu Bar)) hide itself from the Mac OS X dock?


This is what you are looking for: http://uselessthingies.wordpress.com/2008/05/18/an-app-without-dock-icon-and-menu-bar/

tl;dr: Package(py2app/pyinstaller(recommended)) your app; in your app's Info.plist add <key>LSUIElement</key><string>1</string>.


If use py2app to package your application. Set plist option like this:

OPTIONS = {
              ...
              'plist': {'LSUIElement': True},
              ...
          }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜