简体   繁体   English

如何在OSX应用程序标题栏中的Qt中添加全屏图标?

[英]How to add Fullscreen icon in Qt in the title bar of an OSX app?

I recently started developing an app in C++ & Qt 5.1 and I would like to have the double-arrowed icon on the title bar of my window like other Mac apps. 我最近开始用C ++和Qt 5.1开发应用程序,我希望窗口标题栏上的双箭头图标像其他Mac应用程序一样。 I created a QtQuick 2 Application project and the default code doesn't make this button appear. 我创建了一个QtQuick 2 Application项目,默认代码没有使此按钮出现。 I noticed that QtQuick 2 UI default project shows this button. 我注意到QtQuick 2 UI默认项目显示了此按钮。 I really don't understand why. 我真的不明白为什么。 Is there someone who can help me ? 有没有人可以帮助我?

Thanks a lot for your answers, 非常感谢你的回答,

jnconte. jnconte。

I don't have experience with qtquick, but if it's the same project file as Qt, you would create the icon (icns file) and add it to the project file like this: - 我没有使用qtquick的经验,但是如果它与Qt是相同的项目文件,则可以创建图标(icns文件)并将其添加到项目文件中,如下所示:-

ICON = images/icon.icns

The icon.icns file, in this case, is in a folder called images, relative to the project file. 在这种情况下,icon.icns文件相对于项目文件位于名为images的文件夹中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM