[Qt-interest] a Notification Widget under OSX
Martin Guillon
MGuillon at movea.com
Tue Feb 2 17:12:46 CET 2010
Hi,
I need a little help with a specific use of QMainWindow.
My aim is to create a Notification System similar to Growl for my application.
I have it running very well under Window. I simply create, from my QT application(which is a simple trayicon and a core), a QMainWindow with no parent, Then I set
setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::SubWindow);
setAttribute(Qt::WA_ShowWithoutActivating);
Then When I show the notification I do
Show();
Raise();
It works very very well on windows because the notification doesn't take the focus so it doesn't stop what I am doing. And the notif is still raised so I get enter and leave event so I can do pretty things.
The problem appears on OSX, I cannot find a way to reproduce that behavior. With such a code I get no mouse enter or leave event because the window is not really raised (because of Qt::WA_ShowWithoutActivating I presume)
Now If I raise the notification on OSX, the I get the events but the notification window gets the focus and so it stops what I am working on.
If anyone sees a way to reproduce the behavior I have on windows under OSX, It would be quite amazing
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100202/919008e7/attachment.html
More information about the Qt-interest-old
mailing list