Hello. I'm trying to write a variant of QStackedWidget in which all layers of the stack are visible at once and all are partly transparent and overlapping.

I want mouse events to filter down the layers, i.e. the topmost layer gets it first, and if it falls on an unused area, the second layer gets a turn, etc.

My main problem seems to be that Qt has bubble-up event semantics. Each layer in the stack is some widget which I can't subclass. I want each widget to respond to mouse events normally, as if it was top-level itself, and with no extra code in those widgets. The containing "stack" needs to intercept all mouse events of its children/layers and forward the message in turns, but then the children/layers need to respond to that same event but only when it originiates from the containing stack.

I can install an event filter in the child layers to capture the mouse events, but If that event filter decides the event originates from the containing stack it can't dispatch a mouse event because that event would get caught again in the filter.

Got any bright ideas?