View Full Version : How to write some text next to the system tray icon?

alex chpenst
4th September 2008, 16:32
does anyone know how it's possible to put a text label next to the system tray icon?
(see also the attached picture).

First, I put an icon tray on the linux toolbar (works fine):

trayIcon = new QSystemTrayIcon(icon);

but I can't find any way to put some text beside the icon. How to do that?
Thanks for any suggestion!

4th September 2008, 21:54
For example you can make an icon with the text.

alex chpenst
5th September 2008, 07:40
Thank you, good idea, but the icon's size is always scaled to 20x20 (don't know the exact size, maybe 18x18, but it's a square). So, if I add some text beside the icon the width becomes bigger than the hight (text + icon, e.g. 40x20 - w x h) and when it's scaled the whole new "long" icon is put into the square 20x20, which makes both the text and icon very small.

Is there any way to make not square icons?

5th September 2008, 09:43
Indeed... In that case you might have to resort to platform-specific solution. There was a systray example on qtnode.net wiki, but it's currently off line.