how to update newly exposed area of a scrolled widget

Posted by yan bellavance on Stack Overflow See other posts from Stack Overflow or by yan bellavance
Published on 2010-06-10T22:20:56Z Indexed on 2010/06/10 22:32 UTC
Read the original article Hit count: 138

Filed under:

I have setAttribute(Qt::WA_OpaquePaintEvent,true) on a widget. From a mouseMoveEvent, I scroll the widget. Now what I need to do is to update the newly exposed area, but it seems that doing this from the paintevent function create an artifact because there is a delay created when the user keeps scrolling. In other words, the widget seems to have scrolled again between the call to scrool and the call or end of paintevent.

For example, while the paint event is trying to draw the desired area, the widget is still scrolling

© Stack Overflow or respective owner

Related posts about qt