Hello.
I have a problem with QChart.
When i plot >3000 samples it goes incredibly slow. I tried plotting a signal with 16000 samples, which took 13 seconds to plot.

Here is the bit that is causing problems:

Qt Code:
  1. QLineSeries *lineseries = new QLineSeries();
  2. QScatterSeries *scatterseries = new QScatterSeries();
  3. QTime mytimer;
  4. mytimer.start();
  5. lineseries->append(ali[bandnr].toList()); // QVector<QPointF>
  6. scatterseries->append(ali[bandnr].toList());
  7. chart_->addSeries(lineseries);
  8. chart_->addSeries(scatterseries);
  9. qDebug() << "time: " << mytimer.elapsed();
  10.  
  11. scatterseries->setMarkerSize(8);
  12. scatterseries->setPen(Qt::NoPen); // do not make border around points
  13. QString name = "hello";
  14. connect(scatterseries, &QScatterSeries::clicked, this, &LinePlot::keepCallout_);
  15. connect(scatterseries, &QScatterSeries::hovered, [=](QPointF point, bool state) {this->tooltip_(point, state, name); });
To copy to clipboard, switch view to plain text mode 
"ali" is just a QVector<QVector<QPointF>>
I read somewhere that appending the data to the QLineSeries/QScatterSeries before adding them to QChart would improve speed. But its the same.
I also read that using "replace" instead of "append" should increase the speed. But it doesn't change anything.

The reason i also add a QScatterSeries is to make my "hover" tooltip only appear on actual data points.

I also tried QCustomPlot instead, which uses 0.142 seconds to plot the same data. Why is QChart that much slower? Is there a solution to make it faster?

Best Regards
DAVC