Qt Creator - how to set application icon for ubuntu linux?
I have seen the original question q开发者_如何学运维t-creator-how-to-set-application-icon
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?
Thanks in advance.
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.
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.
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.
精彩评论