AppImage does not show icon in task bar

Hi Simon,

I have made a lot of progress in creating an AppImage for my SER Player application. The one thing I have noticed is that the task bar at the bottom of the screen does not show SER Player’s icon when it is running, instead showing a default icon, This seems to be true on all distros that I have tried it on. Is this expected?

SER Player AppImage:

Snapshot of desktop showing missing icon in the task bar:


How do you run the AppImage, execute it directly or through a .desktop file installed by the desktopintegration script? In the latter case, the icon should show up because the icon from the .desktop file is used. In the former case, it is a bit unpredictable because Ubuntu tries to determine the icon from the window of the application which in my experience works only half of the time.

I see the same icon whether I start it from the menu bar or by double-clicking on an AppImage. This is with Ubuntu MATE just in case that makes a difference.

In Qt, do you set an icon for the “SER Player” main window? (If you don’t, try doing it.)

By the way, on Ubuntu 16.04, when launching SER Player through the menu entry generated by the desktopintegration script, then the icon is shown for me.

I have never needed to call QApplication::setWindowIcon() in my application before, so I was not calling it. However, I added the setWindowIcon() call to the SER Player code and now the correct icon is shown in the task bar.

So once again Simon, thanks for your help!

Your’re welcome - I learned something here too: that the particular method in Qt is QApplication::setWindowIcon() :slight_smile: