Results 1 to 4 of 4

Thread: How to write some text next to the system tray icon?

  1. #1
    Join Date
    Jul 2008
    Posts
    14
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to write some text next to the system tray icon?

    Hi,
    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!
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to write some text next to the system tray icon?

    For example you can make an icon with the text.

  3. The following user says thank you to jacek for this useful post:

    alex chpenst (5th September 2008)

  4. #3
    Join Date
    Jul 2008
    Posts
    14
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to write some text next to the system tray icon?

    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?

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to write some text next to the system tray icon?

    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.

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. possible to convert string/numbers to tray icon?
    By jarmok in forum Qt Programming
    Replies: 2
    Last Post: 19th July 2008, 18:34
  3. Replies: 4
    Last Post: 30th June 2008, 06:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.