Results 1 to 3 of 3

Thread: QGraphicsItem.setPos takes a lot of time

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QGraphicsItem.setPos takes a lot of time

    There are many things you can do. For starters set the viewport update mode to FullViewportUpdate. If you're using OpenGL this should already be the case but then passing scene.update() with some parameters shouldn't make any difference. In general when moving all the items it is wise to disable indexing, enabling cache and doing some other things but it depends on a case-by-case basis.
    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.


  2. The following user says thank you to wysota for this useful post:

    ricofe25 (8th December 2009)

  3. #2
    Join Date
    Dec 2009
    Location
    Russia, Saint-Petersburg
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: QGraphicsItem.setPos takes a lot of time

    Thank you. The FullViewportUpdate mode and indexing disabling have given valuable performance improvements.

Similar Threads

  1. QTextEdit loading takes long time
    By sreedhar in forum Qt Programming
    Replies: 12
    Last Post: 21st March 2011, 10:29
  2. Replies: 4
    Last Post: 3rd August 2009, 20:25
  3. Replies: 1
    Last Post: 1st February 2008, 18:55
  4. QDateTime GMT add sec. or - sec. from locale time....
    By patrik08 in forum Qt Programming
    Replies: 2
    Last Post: 20th February 2007, 16:39
  5. Problem with pointers while using localtime() and time()
    By jamadagni in forum General Programming
    Replies: 7
    Last Post: 11th January 2006, 15:48

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
  •  
Qt is a trademark of The Qt Company.