MAC上的QT/C++ - 如何隐藏Dock图标?

Jas*_*enX 6 macos qt

我希望隐藏我的停靠图标,并将应用程序表示为菜单栏(右侧)上的菜单图标.

Nat*_* S. 12

这将隐藏图标:

http://www.macosxtips.co.uk/index_files/disable-the-dock-icon-for-any-application.html

总结URL,在Info.plist应用程序里面的dict xml元素中添加以下行:

<key>LSUIElement</key>
<string>1</string>
Run Code Online (Sandbox Code Playgroud)

您需要使用适当的OS API来添加菜单.