PDA

View Full Version : Tray icon is missing on some systems.



eurodatar
7th August 2009, 09:25
Hi,
I'm using the Qt 4.5.2 SDK with MinGW to develop a program with a system tray icon on Windows.

On the dev machine, this program works just as expected. When I deploy it to a different machine, the icon in the system tray is blank/missing!

I've tried loading the icon both from a file and from a resource and the same thing happens. I've also noticed that I can't even save the icon on the systems that the bug appears on (with QIcon:: pixmap::save).

The dev machine is an XP SP2, but I have encountered the bug both on SP1 and on SP2.

I'm doing a simple deployment by copying the Qt and mingw dlls and the exe.

Later edit: after doing some more testing, it seems that this happens only for ico files. BMPs work, with the obvious disadvantage of having no transparency.

faldzip
7th August 2009, 10:42
use .png format and make sure you deploy the proper image formats plugins in the imageformats directory.

ajax
16th February 2011, 00:39
Just want to add the following: for various reasons the graphics designer desired to provide the system tray icon as a .svg file. This worked fine on my machine so I had the impression that all was OK.

Then the tester reported that system tray icon was either missing or transparent. We both had Win 7, 64 bit machines, so compatibility wasn't suspected.

faldżip's post alerted me that .png might work better. Switching to .png solved the bug.

Thanks, faldżip!