hi..

i have parent widget "P" which has several child widgets which are not in a layout. i have just placed them to fixed positions by move()..

child widget "A" has a irregular shape, by setting its background to a pixmap which has transparent sections.

child widget "B" is button which is behind "A" (i.e the z-order), but "B" lies behind the transparent section of "A" so it is visible.

1. now i want to click the "B" but i cannot because "A" is in front of it.
2. If i use setMask() on "A", then i am able to click "B".
3. But setMask() also disables the paintevent on transparent section of "A", and i have some childwidgets of "A" on the transparent section which do not show if i use setMask(). Therefore setMask() is not an option for me.
4. I only need to pass mouseEvents to "B" so i ignore them in "A's" mouseEvents... but these
ignored events goes to "P" (parent widget of "A"). I want to send the mouseevent to "B".

so whats the best way to send the mouseevent from "A" to "B"?

i am thinking that in the mouseEvents handlers of "P" i check wether the pos() of click comes in geometry of "B", then manually postEvent() a new mouseEvent to "B"...

but this solution is not good i think... coz i forsee the mess of drag, please tell me what should i do in this situation?

may be if someone knows how setMask() is able to send the event to "B".? i tried looking at the source but i was lost in the code...