Ignore all events from a widgets
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.
Re: Ignore all events from a widgets
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...
Re: Ignore all events from a widgets
I'm using a clipPath on my main widget in order to display a rounded shaped list.
like this :
Code:
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.
http://bunjeee.free.fr/border.png
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 ?
Re: Ignore all events from a widgets