问题描述
我看到了原始问题
但它没有帮助我,因为我在 ubuntu 中构建了一个应用程序,而
对我来说不清楚。
but it did not help me because i am building an app in ubuntu and the Qt`s Documentationis 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的应用程序图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!