Unity Launcher Icon Not Installed by Qt

I am trying to get the Qt application to display an icon in Unity Launcher, but it does not work. In the code, I just use:

qApp->setWindowIcon(QIcon("path/to/icon.png")); 

but he does nothing. I also tried to set the icon directly in the main window, but that doesn't help either.

Any idea what could be the problem?

PS: I checked the icon path and that is correct.

+4
source share
2 answers

Without knowing the details of unity, I am sure that you will need to create and install a .desktop file with an icon in it. See for example here . Regardless of what you installed at run time, the launcher cannot know about it before launching the application, so it will need information from an external configuration.

0
source

To enable image encoding on Windows (not Ubuntu), I placed the QT \ 4.8.3 \ plugins \ imageformats folder next to my application. I think you should try the same thing.

0
source

All Articles