PDA

View Full Version : QSystemTrayIcon not displaying



Woody1987
April 28th, 2012, 11:21 PM
My qt app has a QSystemTrayIcon but it is not showing in the appindicator area. It displays in kde but not in unity. I have sni-qt (https://launchpad.net/sni-qt) installed but it doesnt seem to be working. I have also whitelisted everything using:
gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"


My code


QMenu *menu = new QMenu(this);
menu->addAction("Test");

QSystemTrayIcon *icon = new QSystemTrayIcon(this);
icon->setContextMenu(menu);
icon->setIcon(QIcon(":/Images/Resources/icon.png"));
icon->setVisible(true);
icon->show();

Woody1987
May 5th, 2012, 10:16 PM
bump

RockBull
June 13th, 2012, 01:52 AM
@Woody1987

Did you manage to solve your issue?

I've the same issue with my App and would like to know what you did to solve it.

RockBull
June 21st, 2012, 12:08 AM
To help others with more clues to look for:

I've managed to fix my issues by changing the resolution of the image to 744x744.

This is the resolution being used in the example app provided by Qt.

I also changed the image format from png to svg. I did a couple of tests and found some resolutions not working.

Regards,