Hi All,
I am have 2 annoying problems with the Windows version of my program. I mostly use Linux and neither of these occur there, so I'm hoping someone who uses Windows a lot might be able to help.
1) My program runs mostly in the icon tray, and uses a pop-up to alert users when they have new messages. The popup is a QDialog with the following in the constructor:
setWindowFlags( Qt:: Dialog | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint );
This works great on Linux, but on Windows causes the pop-up to steal focus. I have tried playing with just about every windows flag I can find, but there seems to be no way for a widget to be On Top in Windows but not steal focus when it first appears with QT, although I have seen it done with GTK and Visual C++. Any ideas?
2) I modified the TrayIcon example so that my program minimized instead of shutting down when someone clicks the close button. To exit the program the Tray-icon Context menu is used.
The problem is that on Windows, if the App is open (And the main window showing) and you shutdown or restart Windows, the program is minimized, and windows halts it's shutdown.
Is there any way to detect if the close came from outside the program or from a user clicking the close button?
Thanks loads
Bookmarks