Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. (QtBeginner) GraphicScene update() and repaint() SLOW performance

(QtBeginner) GraphicScene update() and repaint() SLOW performance

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 996 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qt_Bg
    wrote on last edited by
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • A Offline
      A Offline
      Asperamanca
      wrote on last edited by
      #2

      What number of points do you have?

      Some performance hints:
      -) Do not use pens with a width other than 1. They are slow (known issue, won't be fixed anymore)
      -) Do not draw the line segments one by one, but use drawPolyline instead

      You might also want to take a look at how QWT does it.

      Q 1 Reply Last reply
      0
      • A Asperamanca

        What number of points do you have?

        Some performance hints:
        -) Do not use pens with a width other than 1. They are slow (known issue, won't be fixed anymore)
        -) Do not draw the line segments one by one, but use drawPolyline instead

        You might also want to take a look at how QWT does it.

        Q Offline
        Q Offline
        Qt_Bg
        wrote on last edited by
        #3

        @Asperamanca said:

        number of points do you

        ECG wave line has total 2000 points.
        I started seeing this slow performance issue after adding a precursor vertical line in front of ECG wave.
        Without the precursor line I did not see any slow down issue.

        /Coverup precursor line
                        painter->setPen(QPen(QColor(0,0,0,255)));
                        painter->drawLine(QLineF(left_foregrnd + p0.x(),(int)rect.top(), left_foregrnd + p0.x(), (int)rect.bottom()));
                        //Draw precursor guide line
                        painter->setPen(QPen(QColor(0,190,89,145)));
                        painter->drawLine(QLineF(left_foregrnd + p1.x(),(int)rect.top(), left_foregrnd + p1.x(), (int)rect.bottom()));
        #endif
        
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved