Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt Creator - how to set application icon for ubuntu linux?

I have seen the original question qt-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.

like image 265
gadlol Avatar asked Dec 01 '10 19:12

gadlol


People also ask

How set Qt application icon?

Setting the Application Icon on Windows This can be done using Microsoft Visual Studio: Select File >> New, and choose the Icon File. Note: You need not load the application into the Visual Studio IDE as you are using the icon editor only.

How do I change a program icon in Ubuntu?

Right-click on the icon that's pinned to your panel and click on Properties. Click on the application's icon on the left within the Launcher Propeties dialog box. A Choose an icon dialog box will appear to allow you to change your icon.

Where do I put application icons in Linux?

/usr/share/icons/ typically contains pre-installed themes (shared by all users) ~/. icons/ typically contains folders with the themes installed by the user. Also, many applications have their icons in /usr/share/pixmaps/ or in the folder with the same name as the application under /usr/share/...


1 Answers

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.

like image 136
Jan Hudec Avatar answered Oct 21 '22 07:10

Jan Hudec