Results 1 to 3 of 3

Thread: faster QScrollView

  1. #1
    Join Date
    Jan 2006
    Posts
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11

    Question faster QScrollView

    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

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: faster QScrollView

    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 ?

  3. #3
    Join Date
    Jan 2006
    Posts
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11

    Arrow Re: faster QScrollView

    can you explain what do you mean by subclassed QWidget from QScrollview ?
    class ImageSeqs : public QScrollView

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

Similar Threads

  1. Which is faster, drawRect(..) Or drawPath(..) ?
    By nileshsince1980 in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2008, 08:26
  2. Faster paintEvent
    By SailinShoes in forum Qt Programming
    Replies: 1
    Last Post: 1st October 2008, 15:25
  3. QScrollView size policy?
    By Henrikas[MI] in forum Qt Programming
    Replies: 1
    Last Post: 19th November 2006, 10:52
  4. Subclassing QScrollView
    By sumsin in forum Qt Programming
    Replies: 13
    Last Post: 16th March 2006, 14:20
  5. How to find size provided by QScrollView
    By Sarma in forum Qt Programming
    Replies: 1
    Last Post: 7th March 2006, 09:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.