View Full Version : Minimize to system tray

14th January 2006, 15:35
I would like to make an app, that can minimize to system tray.
How can I do that?

14th January 2006, 15:51
this is system and/or window manager specific.
Specify under under which you want to implement this.

14th January 2006, 23:02
Under Windows 2000/XP

15th January 2006, 06:02
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 (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shell_notifyicon.asp) could help you

Hope it helps.


15th February 2006, 20:21
Don't know wether it's working:

13th January 2009, 05:34
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.

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

please advice.