View Full Version : Ignore all events from a widgets

25th October 2007, 03:03
Hey there,

I have a parent widget containing a layout of widgets and a big raised transparent widget above everything : covering the entire area of the parent.

Since this widget occupies the entire area the mouse events aren't propagated to the underneath widgets anymore.

Since I'm only using the paintEvent of the raised widget, Is there a way to ignore every other single event and propagate them to the other widgets, without implementing a tedious filtering process.

25th October 2007, 07:10
I don't think you want to ignore every event... But if you do, reimplement event() for the widget and return false from it. What is the point of having such a transparent widget anyway? Maybe there are better ways to obtain the goal you want...

25th October 2007, 12:04
I'm using a clipPath on my main widget in order to display a rounded shaped list.

like this :

QRectF maskRect(rect().x(), rect().y(), rect().width(), rect().height() - 1);

setMask(QRegion(ZePainterController::get()->DrawRoundRect(maskRect, 2000 / maskRect.width(), 2000 / maskRect.height()).toFillPolygon().toPolygon()));

Problem is, it only takes a QRegion and QRegion isn't float based so the border is innacurate, as shown on the attached screen.


So I thought I would use a raised widget just to display that border above the rest.

It was yesterday night and I guess I was a bit tired :). Maybe I could use some kind of graphic item insted ?

25th October 2007, 17:56
Why not use stylesheets?