QPaintEvent ignore automatic clipping
-
-
Hey
I'm drawing an element which is animated. During the animation at some point the element may "leave" the bouding rect of widget geometry. How can I disable clipping in paintEvent so that it would draw outside the widget geo ?
Regards
Dariusz@Dariusz
My guess:-
If you construct your own
QPaintercall the necessary (larger)setClipRect()and/orsetCipRegion(). -
If you override
QWidget::paintEvent(QPaintEvent *event)substitute your ownQPaintEventwith (larger)QRect/QRegionbefore passing on.
Not sure whether you will have other problems (such as "artefacts" being shown) if you make a widget paint outside its
boundingRect(). -
-
Hi,
Do you mean draw on a different widget ? If so, you can't. What you can do is use a larger widget so you have a larger surface to use.