Results 1 to 5 of 5

Thread: Dragging multiple Qt4 QGraphicsItems MUCH slower than Qt3 QCanvasItems

  1. #1
    Join Date
    Jun 2008
    Location
    Boulder, Colorado, USA
    Posts
    70
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Dragging multiple Qt4 QGraphicsItems MUCH slower than Qt3 QCanvasItems

    When selecting and dragging about 20 QGraphicsItems (with 40x40 pixel pixmaps), move updates are VERY slow. Doing the same with Qt3 Compatibility Library QCanvasItems there is NO delay (all in the same build). We're using Qt 4.3.3 on Windows and Solaris.

    I've tried refraining from setting antialiasing and SmoothPixmapTranform render hints -- no noticeable difference in terms of speed. (But the effect of doing so is apparent in terms of graphics quality).

    We're not yet ready to build with newer versions of Qt (e.g. Qt 4.4) -- that's coming. Has this been addressed, or is there anything we can do about this?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dragging multiple Qt4 QGraphicsItems MUCH slower than Qt3 QCanvasItems

    Strange that something in Qt3 works faster than in Qt4 !
    still there are improvements in Qt 4.4 with introduction of cache mode for graphicsitems.
    And in Qt 4.5 there are many improvements

    You can refer this link too

    Yet, am not sure why ur code in 4.3 is running slower than Qt 3

  3. The following user says thank you to aamer4yu for this useful post:

    philw (4th March 2009)

  4. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Dragging multiple Qt4 QGraphicsItems MUCH slower than Qt3 QCanvasItems

    Try profiling the application to see what causes the slowdown. Without any details on the situation we can't help you in any way and I doubt just upgrading to Qt 4.4 or 4.5 would help significantly. I can assure you I can drag many GV items without slowdowns.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #4
    Join Date
    Jun 2008
    Location
    Boulder, Colorado, USA
    Posts
    70
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Dragging multiple Qt4 QGraphicsItems MUCH slower than Qt3 QCanvasItems

    ... Thanks, yes. We will try profiling with Purify.

    We tried two things (still in Qt 4.3): (1) A test with just an empty QGraphicsPixmapItem subclass without any processing on events (i.e. no virtual method re-implementations), and also (2) recoding to "composite" two child QGraphicsItems (a Pixmap item and a Text item) instead of doing our own drawing. Both helped only a little. (About the same. Very slow drag-moving with twenty 40x40 icons items selected, even without text drawing). So maybe we're doing something to the QGraphicsScene or QGraphicsView which is bad? We should profile.

    Here's an article discussing basically this problem back in 2007 with Qt 4.2, with some suggestions ... Qt: Improving QGraphicsView Performance ..
    http://thesmithfam.org/blog/2007/02/03/qt-improving-qgraphicsview-performance/

    The new White Paper from Nokia ... Ensuring Maximum Performance with Qt .. (free download with registration) .. makes Qt 4.5 look VERY promising. I can't wait to give that a try. http://www.qtsoftware.com/forms/whitepapers/reg-whitepaper-performance

  6. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Dragging multiple Qt4 QGraphicsItems MUCH slower than Qt3 QCanvasItems

    Is it possible for you to share some of the code with us? Especially the implementation of items you use.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Tags for this Thread

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.