Update QChart in real time
Solved
General and Desktop
-
How can I update QChart in real time?
The QChart is updated only when I remove and add series again, is there any other possibility to do that?
My code that does not update the chart:QChart * tempChart = new QChart(); QLineSeries * tempSeries = new QLineSeries(); //... tempSeries->append(elapsedTimer->elapsed()/1000, temp);
Code that updates the chart:
QChart * tempChart = new QChart(); QLineSeries * tempSeries = new QLineSeries(); //... tempChart->removeSeries(tempSeries); tempSeries->append(elapsedTimer->elapsed()/1000, temp); tempChart->addSeries(tempSeries);