Results 1 to 3 of 3

Thread: deletion problem with QGraphicsScene

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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: deletion problem with QGraphicsScene

    Hi, first I haven't dealed with such a huge amount of items. Some thought coming to my mind (without testing if they improve speed):
    a) can you reuse your once created items?
    b) use removeItem() to remove them fast from the scene and then delete only the items in a worker thread.
    c) while changing the scene use QObject::blockSignals() to fasten your operations up. (also turn the index off)

    Lykurg

  2. #2
    Join Date
    Jun 2009
    Posts
    33
    Thanks
    5
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: deletion problem with QGraphicsScene

    Lykurg --
    Hey, those are some good ideas. I had thought of reusing items but have forgotten about simply removing items from the scene. I'll try this and see what happens.

    jw

Similar Threads

  1. Controling the deletion of objects?
    By mooreaa in forum Qt Programming
    Replies: 3
    Last Post: 4th July 2008, 18:08
  2. Custom model item deletion (Qt4.4)
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 22nd May 2008, 14:35
  3. QPointer and double deletion
    By mtrpoland in forum Qt Programming
    Replies: 6
    Last Post: 28th September 2007, 12:49
  4. QTableWidget's rows deletion and again insertion
    By darpan in forum Qt Programming
    Replies: 1
    Last Post: 17th October 2006, 18:30

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.