Qt Creator - 如何设置ubuntu linux的应用程序图标? [英] Qt Creator - how to set application icon for ubuntu linux?

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

问题描述

我看到了原始问题 qt-creator-how-to-set -application-icon

但它没有帮助我,因为我在 ubuntu 中构建了一个应用程序,而 Qt的文档
对我来说不清楚。

but it did not help me because i am building an app in ubuntu and the Qt`s Documentation is not clear for me..

有没有人,谁做过?
方法是什么?

Is there anynone, who has done it? Whats the method?

提前感谢。

推荐答案

p> Linux没有用于读取嵌入式资源的任何标准,因此没有办法将图标嵌入应用程序二进制本身,并将其显示在菜单和启动器中。您必须将相应的 pixmaps 目录和 .desktop 文件安装到相应的 apps 指向您的应用程序和相应图标的目录。

Linux does not have any standard for reading embedded resources, so there is no way to embed the icon in the application binary itself and have it display in the menu and launcher. You will have to install your icon in the appropriate pixmaps directory and a .desktop file in appropriate apps directory pointing to your application and respective icon.

您引用的Qt文档指的是图标主题规范,其中描述了应该安装文件的位置。

The Qt documentation you quoted refers to icon theme specification, which describes where the files should be installed. Look for the Installing Application Icons towards the end for summary of what needs to be done.

您必须将文件安装在安装应用程序图标安装你的构建系统的目标(qmake或cmake或你使用的),并可能创建一个Debian包。 Qt Creator不太可能帮助你。

You will have to install the files in the "install" target of your build system (qmake or cmake or what you use) and possibly create a Debian package on top of that. The Qt Creator is unlikely to help you with these.

这篇关于Qt Creator - 如何设置ubuntu linux的应用程序图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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