M
M
MS242014-11-28 10:08:09
linux
MS24, 2014-11-28 10:08:09

What is the reason for the black background of the system tray icon when using QSystemTrayIcon on Linux?

In a Qt project, I want to use the application icon in the system tray.
I use the following code:
trayIcon = new QSystemTrayIcon(this);
trayIcon->setIcon(QIcon(":/app-ind.png"));
trayIcon->setContextMenu(mainMenu);
trayIcon->show();
The image has a transparent background. At the same time, the icon is displayed normally in cinnamon, but in unity and lxpanel, the background is displayed in black. Googling doesn't give anything clear. The Qt version is 5.3.2. I tried resizing the image according to the recommendations - the result is the same.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question