Results 1 to 4 of 4

Thread: QSystemTrayIcon doesn't show icon ?

  1. #1
    Join Date
    Jan 2006
    Posts
    185
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QSystemTrayIcon doesn't show icon ?

    I have s program that, when run, the icon appears in the system tray.

    this works perfect in Windows, the icon appears in the task bar with all its colors and the way I created it.

    When I run the same program under Linux (tested in Mandriva 2007 and Fecora Core 4), then the icon only shows the borders, not the inside of the icon.

    Do you know what is wring ?
    Should I save the icon with some special features ?

    At the moment my icons are 16x16 and .png

    Thanks.

  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: QSystemTrayIcon doesn't show icon ?

    Do you specify absolute path to the .png file?

  3. #3
    Join Date
    Jan 2006
    Posts
    185
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSystemTrayIcon doesn't show icon ?

    The path I put in the code is something like "icon.png".

    The icon is located in the same folder as the .exe or linux executable.

    How can I tell the absolute path, I don't know where users are going to unpack the program ?

  4. #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: QSystemTrayIcon doesn't show icon ?

    Quote Originally Posted by probine View Post
    The icon is located in the same folder as the .exe or linux executable.
    Then try QCoreApplication::applicationDirPath() + QDir::separator() + "icon.png" or use resources.

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

    probine (25th January 2007)

Similar Threads

  1. Showing Icon in vertical header of a table
    By vishal.chauhan in forum Qt Programming
    Replies: 7
    Last Post: 15th January 2007, 10:44
  2. set Icon to .app file
    By vishal.chauhan in forum Qt Programming
    Replies: 2
    Last Post: 10th January 2007, 21:13
  3. WYSIWYG html, Window show png icon mac no!
    By patrik08 in forum Qt Programming
    Replies: 10
    Last Post: 25th May 2006, 12:01
  4. QtSingleApplication
    By mule in forum Qt Programming
    Replies: 8
    Last Post: 28th February 2006, 19:21
  5. How to dispay an icon in the first column of QTreeView
    By yogeshm02 in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2006, 15:51

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.