John Levon wrote: > On Thu, Nov 20, 2003 at 09:33:26AM +0100, Alfredo Braunstein wrote: > >> qt seems to emit only when the value is actually changed (good). The >> problem is that on update, we redraw and then call to adjust the >> scrollbar, with a new value, and this calls an update again. > > ICBW, but this behaviour might be intentional. When scrolling large > amounts we avoid unnecessary redraws, but when scrolling a little, we > "flicker". I have a comment somewhere in qt2/ that mentions this I > think. IIt was required to fix a problem mentioned by J Vigna where Qt > was responding too slowly or soomething.
I've grepped a little qt/*.C and found the following in qttableview.C: /*! Repaints the table view directly by calling paintEvent() directly unless updates are disabled. Erases the view area \a (x,y,w,h) if \a erase is TRUE. Parameters \a (x,y) are in \e widget coordinates. If \a w is negative, it is replaced with <code>width() - x</code>. If \a h is negative, it is replaced with <code>height() - y</code>. Doing a repaint() usually is faster than doing an update(), but calling update() many times in a row will generate a single paint event. At present, QtTableView is the only widget that reimplements \link QWidget::repaint() repaint()\endlink. It does this because by clearing and then repainting one cell at at time, it can make the screen flicker less than it would otherwise. */ and /*! Sets the auto-update option of the table view to \a enable. If \a enable is TRUE (this is the default), the view updates itself automatically whenever it has changed in some way (for example, when a \link setTableFlags() flag\endlink is changed). If \a enable is FALSE, the view does NOT repaint itself or update its internal state variables when it is changed. This can be useful to avoid flicker during large changes and is singularly useless otherwise. Disable auto-update, do the changes, re-enable auto-update and call repaint(). \warning Do not leave the view in this state for a long time (i.e., between events). If, for example, the user interacts with the view when auto-update is off, strange things can happen. Setting auto-update to TRUE does not repaint the view; you must call repaint() to do this. \sa autoUpdate(), repaint() */ Is that what you where refering to? They don't seem to be so much related, but I can be wrong... Nothing doesn't seems to flicker for me with the patch. What should I do? Alfredo
