PDA

View Full Version : QSystemTrayIcon doesn't show icon ?



probine
25th January 2007, 19:22
I have s program that, when run, the icon appears in the system tray.

this works perfect in Windows, the icon appears in the task bar with all its colors and the way I created it.

When I run the same program under Linux (tested in Mandriva 2007 and Fecora Core 4), then the icon only shows the borders, not the inside of the icon.

Do you know what is wring ?
Should I save the icon with some special features ?

At the moment my icons are 16x16 and .png

Thanks.

jacek
25th January 2007, 19:32
Do you specify absolute path to the .png file?

probine
25th January 2007, 20:01
The path I put in the code is something like "icon.png".

The icon is located in the same folder as the .exe or linux executable.

How can I tell the absolute path, I don't know where users are going to unpack the program ?

jacek
25th January 2007, 20:17
The icon is located in the same folder as the .exe or linux executable.
Then try QCoreApplication::applicationDirPath() + QDir::separator() + "icon.png" or use resources.