PDA

View Full Version : faster QScrollView



firas
29th April 2006, 16:53
Hello,
I subclassed my QWidget (WFlags: Qt::WStaticContents | Qt::WNoAutoErase ) from QScrollview to view a sequence of images . I wonder which way is faster:
1. calling repaint(false); (faster but new images don't show, i.e. no update)
2. calling updateContents(); (slow, but correct)
3. calling repaintContents(false); (same as 2)

image drawing is done in: drawContents ( QPainter * p, int , int , int , int )

while experimenting I foud performance gain up to 2.5 folds but as I kept chaning the code I lost that configuration and couldn't figure out again the best configuration?

firas:eek:

munna
29th April 2006, 17:56
We have developoed a kind of editor which calls for lots of drawing and we use updateContents. It works perfectly. No flicker, no delay nothing.


I subclassed my QWidget (WFlags: Qt::WStaticContents | Qt::WNoAutoErase ) from QScrollview to view a sequence of images .

can you explain what do you mean by subclassed QWidget from QScrollview ?

firas
29th April 2006, 18:49
can you explain what do you mean by subclassed QWidget from QScrollview ?
class ImageSeqs : public QScrollView

============================================