Results 1 to 5 of 5

Thread: QGraphicsView expert ? slown view with a lot of items

  1. #1
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question QGraphicsView expert ? slown view with a lot of items

    Hi,

    I'm looking for a QGraphicsView expert to help me to improve the performance of my QGraphicsView.

    The problem is that when I have a lot of items, it take up to 10 seconds to refresh (move item, context menu ...)

    I have play a lot with it, but found no solution so I'm ready to hire someone for a small job to help me !

    Any idea is welcome.

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QGraphicsView expert ? slown view with a lot of items

    Without any knowledge of your actual code: Have you tried different settings for QGraphicsView::OptimizationFlag, QGraphicsView::ViewportUpdateMode or disabled the scene index (QGraphicsScene::ItemIndexMethod). Also altering renderHints can improve the speed.

    Last option you could look at is to implement a level of detail (QStyleOptionGraphicsItem::levelOfDetailFromTransform) or altering your item flags, e.g. static content etc.

  3. #3
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsView expert ? slown view with a lot of items

    Thanks,

    I have already play with a lot of options, there are several weeks I'm trying to improve the performance but without result :-(

    you can download the code here http://www.spectralpixel.com/images/pgEditor.zip

    Regards

  4. #4
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsView expert ? slown view with a lot of items

    I have found one solution for speed, the problem was related to QGraphicsItem::ItemCoordinateCache or QGraphicsItem:eepItemCoordinateCache. When I use QGraphicsItem::NoCache it is really faster.

    The problem is that I have no more antialiasing ! When I look at the documentation it seems that it completely redraw the item, so I don't understand why I have no anti aliasing !

    Do you have an idea ?

    Thanks

  5. #5
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsView expert ? slown view with a lot of items

    Nobody has an idea about the problem ?

    Thanks

Similar Threads

  1. Items in QGraphics View not starting from the top.
    By penny in forum Qt Programming
    Replies: 3
    Last Post: 1st April 2011, 13:10
  2. QGraphicsView + steady Items
    By medved6 in forum Qt Programming
    Replies: 2
    Last Post: 25th August 2010, 19:20
  3. List View with renamable items?
    By MattT in forum Qt Programming
    Replies: 2
    Last Post: 17th July 2010, 10:21
  4. Replies: 4
    Last Post: 31st March 2010, 11:48
  5. QGraphicsView overlapping items
    By juliarg in forum Newbie
    Replies: 1
    Last Post: 5th April 2007, 09:35

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.