PDA

View Full Version : Drawing points on a chart with a spline series



Druid89
9th November 2016, 19:28
Hello I'm new in Qt and I want to draw points on a chart with a spline series, So far I reimplement the paint() function of QChart but it does nothing.
Please can anyone help me??
thank in advanced.
pd: sorry about the english

d_stranz
10th November 2016, 16:42
So far I reimplement the paint() function of QChart but it does nothing.

Completely the wrong way to do it. Create a new QSplineSeries, add your control points to it (QXYSeries::append()), and then add that to the QChart instance using QChart::addSeries(). *You* do not need to derive from QChart, QSplineSeries, or anything else, and you do not need to paint anything yourself. QChart and QSplineSeries do all of that for you.

Druid89
10th November 2016, 18:01
Thanks for the help, you save me!!!