[Interest] Unnecessary repaints.

Jason H jhihn at gmx.com
Fri Dec 18 20:35:03 CET 2015



> Sent: Thursday, December 17, 2015 at 4:24 PM
> From: "william.crocker at analog.com" <william.crocker at analog.com>
> To: interest at qt-project.org
> Subject: Re: [Interest] Unnecessary repaints.
> 
> Well, the code deep inside of QWifget::updateGeometry boils down to this.
> My call results in the postEvent. I assume that would be serviced
> upon return to the event loop, and before the subsequent paint.
> 
>               if (parent->d_func()->layout)
>                   parent->d_func()->layout->invalidate();
>               else if (parent->isVisible())
>                   QApplication::postEvent(parent, new 
> QEvent(QEvent::LayoutRequest));
> 
> Or does that have nothing to do with QLayout and the QEvent::LayoutRequest
> is sent after the paint. I am catching that in my widget event handler and
> updating my widget geometry and calling update(). Is that where the second,
> unexpected repaint is coming from.


I don't know where that code is, but if that's your issue, then try putting the widget in another layout within the layout. That should shield the rest of the app from repainting more than needed. 



More information about the Interest mailing list