在Mac上设置图标与Qt

在Mac上设置图标与Qt

本文介绍了在Mac上设置图标与Qt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如Qt-Documentation中所述,我使用icon-composer创建了我的图标文件。然后我在我的.pro文件中插入了以下行。

  ICON = 3D_Modell.icns 

编译时遇到以下错误:

 没有规则制作目标`../3D',需要由3D_Modell.app/Contents/Resources/3D_Modell.icns

Contents / Resources文件夹在哪里?
在哪里我放的icns文件。我已将其放入我的项目和所有cpp和h文件所在的文件夹。

解决方案

建议您可以添加手动创建图标:

要从查找程序访问您的应用程序包,请右键单击您的应用程序,然后从上下文菜单中选择显示包内容。这将打开一个新的查找窗口,您可以从中导航到 / Contents / Resources /




$ b

编辑:



PropertyListEditor实用程序位于 Developer / Applications / Utilities / 。您可以使用它来打开您的应用程序包,并编辑plist(位于包的 / Contents / 文件夹中)。在编辑器中 CFBundleIconFile 项目有助于调用图标文件,但如果选择视图>显示原始键/可以看到实际的属性名称。




As described in the Qt-Documentation I have created my icon file with the icon-composer. Then I have inserted in my .pro-file the following line.

ICON = 3D_Modell.icns

While compiling I get the following error:

No rule to make target `../3D', needed by `3D_Modell.app/Contents/Resources/3D_Modell.icns'

Where is the Contents/Resources folder?Where exactly do I put the icns-file. I have put it into the folder where my project and all cpp and h files lie.

解决方案

The instructions suggest you can add the icon manually:

To get access to your application bundle from the finder, right-click on your application and select 'show package contents' from the context menu. This will open a new finder window from which you can navigate to /Contents/Resources/.

Hope this helps.

EDIT:

The PropertyListEditor utility is in Developer/Applications/Utilities/. You can use it to "open" your application bundle, and edit the plist (located in the bundle's /Contents/ folder). The CFBundleIconFile item is helpfully called Icon File in the editor, but if you select View > Show Raw Keys/Values you can see the actual property names.

这篇关于在Mac上设置图标与Qt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 01:51