Results 1 to 7 of 7

Thread: qt 4.4 Issue with too many QGraphicsItems

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2009
    Posts
    33
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    5

    Default Re: qt 4.4 Issue with too many QGraphicsItems

    pherthyl: I have that flag set already in the view and I did notice a boost in speed. Thanks!

    Since Last time I have reimplemented the QGraphicsScene::drawItems() function and this sped up redraw a bit (entirely skip drawing of child items when I only need to draw parent).
    After testing, I have found that my drawing routine is moving very fast compared to the loading of the said 100,000-400,000+ items from the QAbstractTableModel. The model data is saved in a SQL database (I'm not working on that part so I'm not sure of the specifics of that database.
    I guess now the question is how to get that data out in a fast way? For now, I just go through the list one at a time and create a QGraphicsItem and set the proper data. This process is taking 3.4 sec on avg. for 136331 items (tested!) For this same project it loads 2 types of data into objects; one is much larger than the other. The smaller set takes just 1.5 secs. and total time from click to the view being populated is around 7-8 secs.

    If this were the largest project I'd be done; but, the largest project takes 3x as long to load.

    is this good or not?
    Also, should I open a new thread for this?


    JW
    sw developer

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

    Default Re: qt 4.4 Issue with too many QGraphicsItems

    How do you populate the scene? Could we see the exact code?
    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.


Similar Threads

  1. Replies: 8
    Last Post: 27th April 2009, 19:19
  2. How to put scaled QGraphicsItems next to eachother
    By profoX in forum Qt Programming
    Replies: 6
    Last Post: 3rd June 2008, 07:44
  3. Replies: 3
    Last Post: 11th April 2008, 12:25
  4. qt3 to qt4 - uic issue
    By hvengel in forum Qt Programming
    Replies: 10
    Last Post: 4th March 2007, 02:59
  5. Replies: 5
    Last Post: 22nd September 2006, 08:04

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.