PDA

View Full Version : QSystemTrayIcon problem in windows



buf1024
16th January 2010, 06:06
Hi All:
I am developing a program.
It doesn't need the main window to interactive with the user, but needs an trayicon in the taskbar. So, I encapsutate the QSystemTrayIcon in my QWidget inherited class, and hide the main widget when the prog is ran. But strange enough, when I show the about informaion(QMeesageBox::about(this, .., ..)) in the trayicon context menu, after clicking the ok pushbutton, the prog exit. But if I show the window normally, the do the samething again, the prog don't exit. this only happens in windows, I do the samething in my RHEL, It works fine.
So, How do I do If I don't want to exit the prog after clicking ok button in wndows?
Thanks a lot!!

buf1024
16th January 2010, 06:18
Solve the problem!