You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Tuesday, March 3rd 2009, 1:15pm

[Qt::WA_TranslucentBackground] How to paint without capturing events at painted places ?


I'm using the new Qt::WA_TranslucentBackground (Qt4.5) attribute to create a semi-transparent toplevel widget. By default, the QWidget grabs mouse events wherever my paintevents paint something (ie. auto-mask). But I want to let mouse events pass through my widget at certain places where I paint (eg. a drop shadow of a frame should not get mouse events). I tried calling QEvent::ignore() is the mouse event handlers of my widget, but that does not cause the event to propagate to the underlying non-Qt windows. I also looked at the widget flag WA_PaintOnScreen, but that does not seem to work in combination with WA_TranslucentBackground.

Does anybody know how to do what I want to achieve?



Tuesday, April 28th 2009, 10:31am


I've got the same same problem (please have look at this posting):
Passing events to overlapped widgets

Have you found a solution by now?
I've described the same problem in several qt forums - but with no luck.



Tuesday, April 28th 2009, 11:15am

..just set the flag


in your Constructor

that's all. It took me over a week and about 5 forum postings to find out how it works ;-)