Qt World Summit: Submit your Presentation

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

  • This post is deleted!

  • 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.

  • @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->drawLine(QLineF(left_foregrnd + p0.x(),(int)rect.top(), left_foregrnd + p0.x(), (int)rect.bottom()));
                    //Draw precursor guide line
                    painter->drawLine(QLineF(left_foregrnd + p1.x(),(int)rect.top(), left_foregrnd + p1.x(), (int)rect.bottom()));

Log in to reply