Results 1 to 6 of 6

Thread: how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame

  1. #1
    Join Date
    Feb 2009
    Posts
    38
    Thanks
    29
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame

    Hello, everyone!
    i use qGraphicsView Frame to draw graph. And I draw my graph on a class which inherit from QGraphicsItem. but when i use massive volume of data,(such as more than 100,000 points),then the speed of the drawing graph is so slowly without anyone's tolerance.
    How can i enhance the speed of drawing points ? if i draw graph on the item class which inherit from QGraphicsPixmapItem, does this will help me to speed up drawing points?
    or any other useful advice ?
    wish your reply !
    Thank you very much!

  2. #2
    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: how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame

    What does the graph look like? Is it composed only from points? If so, I would advise to make each point a separate item or cluster points and use a smaller (but still larger than 1) items to display the points. The speed of graphics view comes also from the fact that it doesn't draw items that are not visible but as you have only one item, it has to draw 100k points all the time and there is no benefit in using graphics view at all. You might have used plan QWidget+QPainter combination with better results in such case.
    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.


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

    christina123y (19th March 2009)

  4. #3
    Join Date
    Feb 2009
    Posts
    38
    Thanks
    29
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame

    Quote Originally Posted by wysota View Post
    What does the graph look like? Is it composed only from points? If so, I would advise to make each point a separate item or cluster points and use a smaller (but still larger than 1) items to display the points. The speed of graphics view comes also from the fact that it doesn't draw items that are not visible but as you have only one item, it has to draw 100k points all the time and there is no benefit in using graphics view at all. You might have used plan QWidget+QPainter combination with better results in such case.
    Thank you for your advice. but i think this is not compatible for my graph. Because my graph is drawed by cluster points of 2D data, and the graph can be manipulated, such as line the points, and set color map and so on! then how can i enhance drawing speed throug qgraphicsItem??

    here is another problem , i need to show two or more graphs (which is drawn by different 2D data points) in a cordinate system. and is required they can be manipulated
    separately.(here all the graph item's bounding rect are of the same size ,and they all put in the same cordinate item ) ! my thought is draw different 2d data points in different qgraphicsItem, but i found that there only show the first graph of the first 2d data , other items can't be seen. this means that other graph items is enveloped by the other.
    how can i resolve this problem? Thank you!
    Wish your reply soon!

  5. #4
    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: how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame

    Quote Originally Posted by christina123y View Post
    but i think this is not compatible for my graph.
    What is not compatible with your graph?
    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.


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

    christina123y (21st March 2009)

  7. #5
    Join Date
    Feb 2009
    Posts
    38
    Thanks
    29
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame

    Quote Originally Posted by wysota View Post
    What is not compatible with your graph?
    I mean the way you adviced(which draw every point as an item ) may not available to my need.
    now i have tried to draw points on an image,then put the image on the QGraphicsPixmapItem.
    And, how can i resolve the other problem as i put forward ? thank you very much

  8. #6
    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: how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame

    Quote Originally Posted by christina123y View Post
    I mean the way you adviced(which draw every point as an item ) may not available to my need.
    Why not?

    And, how can i resolve the other problem as i put forward ? thank you very much
    I'm not sure what you wanted there so it's hard to answer. My first guess would be that you need two scenes and two views.
    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.


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.