Results 1 to 6 of 6

Thread: Minimize to system tray

  1. #1
    Join Date
    Jan 2006
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Minimize to system tray

    I would like to make an app, that can minimize to system tray.
    How can I do that?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Minimize to system tray

    this is system and/or window manager specific.
    Specify under under which you want to implement this.

  3. #3
    Join Date
    Jan 2006
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Minimize to system tray

    Under Windows 2000/XP

  4. #4
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Minimize to system tray

    As theLSB said, this is a task of OS or WM. For windows XP and 2000 && Qt3 I used the Windows API Shell_NotifyIcon from shell32.dll.
    I started to consturct a class for using it some time ago, but I didn't finish as I had to stop working with Qt.

    Anyway, Qt3 NC for Windows has an example of SysTray, maybe, you can use it as reference. I don't know about this on Qt4, I haven't installed on Windows yet.

    If you want my files, just ask me for them, there is a lot of work to do to make them perfect, but they are working.

    In the meanwhile, this could help you

    Hope it helps.

    Cheers.
    Kandalf
    There's no place like ~

  5. #5
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Minimize to system tray

    Don't know wether it's working:
    http://www.qtnode.net/wiki/Systray
    It's nice to be important but it's more important to be nice.

  6. #6
    Join Date
    Jan 2009
    Posts
    53
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Minimize to system tray

    Anyone know how to implement hide to system tray at QMainWindow startup? It must not appear on the task bar on startup too.

    Thanks in advance.

    [EDITED] Fixed the problem. There is another show() function in the main.cpp by default Qt template in Visual Studio. I did removed it and then the problem is solved.

    But I still cannot hide to tray on minimize. The task bar icon still exist during minimize.

    please advice.
    Last edited by sheeeng; 13th January 2009 at 06:35.

Similar Threads

  1. Minimize to system tray
    By aLiNuSh in forum Newbie
    Replies: 17
    Last Post: 4th March 2010, 12:51
  2. how to use System Tray Icons in QToolBar
    By wagmare in forum Qt Programming
    Replies: 2
    Last Post: 13th January 2009, 15:52
  3. How to write some text next to the system tray icon?
    By alex chpenst in forum Qt Programming
    Replies: 3
    Last Post: 5th September 2008, 08:43
  4. Replies: 4
    Last Post: 30th June 2008, 06:25
  5. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15

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.