MAC上的QT/C ++-如何隐藏我的停靠图标? [英] QT/C++ on MAC - How do I hide my dock icon?

查看:279
本文介绍了MAC上的QT/C ++-如何隐藏我的停靠图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'd like my dock icon to be hidden and the app to be represented as a menu bearing icon on the menu bar (right hand side).

推荐答案

这将隐藏图标:

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

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

Summarizing the URL, in the dict xml element inside Info.plist in the app, add the lines:

<key>LSUIElement</key>
<string>1</string>

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

You need to use the appropriate OS APIs to add the menu.

这篇关于MAC上的QT/C ++-如何隐藏我的停靠图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆