如何在OS X的Qt应用程序中设置足以分发的应用程序图标? [英] How to set the application icon in a Qt application on OS X, sufficient for distribution?

查看:117
本文介绍了如何在OS X的Qt应用程序中设置足以分发的应用程序图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

紧随此答案解决方案

首先,我想提到XCode的Icon Composer在这里无法使用,因为无法创建分辨率为1024x1024 px的icns文件./p>

要生成icns文件,我使用了 iConvert图标.主要缺点是它不是免费的.要生成icns文件,您需要的是分辨率为1024x1024或更高的png图像.这个过程非常简单,所以我不会介绍.

此后,您必须在项目中包含图标.为此,请在Qt应用程序的.pro文件中将图标的插入路径插入

:

macx-clang {
    ICON = osx.icns
}

Following up on this answer to this question, I would like a clear, step-by-step set of instructions on how to set the application icon for a Qt application on OS X sufficient for distribution of the application via an installer and/or through the App Store.

The instructions should include how to set the four sizes of the icon, as referenced in the linked answer, above.

Please bear in mind that I have no experience in distributing OS X applications, building installers for OS X applications, or setting the icon that appears in the Finder bar for OS X applications. Rather, I am an experienced C++ programmer (mostly on Windows and Linux).

I especially seek a clear, step-by-step set of instructions.

解决方案

First of all I'd like to mention that Icon Composer for XCode won't work here because it's not possible to create icns file with resolution 1024x1024 px.

To generate icns file I used iConvert Icons. The major drawback is that it's not free. To generate icns file all you need is png image with resolution 1024x1024 or more. The process is really simple so I won't cover it.

After that you'll have to include your icon in your project. To do that insert path to your icon in your Qt application's .pro file:

macx-clang {
    ICON = osx.icns
}

这篇关于如何在OS X的Qt应用程序中设置足以分发的应用程序图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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