QCustomPlot Discussion and Comments

Why QCPLayer::replot doesnt emit QCustomPlot::afterReplot?Return to overview

Hello everybody! I use QCustomPlot together with QML. It is very important for me to use the QCustomPlot::afterReplot() signal, since by this signal I call the QQuickPaintedItem::update() method to further call the paint method. But when I want to redraw only one layer using QCPLayer::replot() I don't get any signal about it and can't call QQuickPaintedItem::update()

How do I get a signal that the layer has been replot?

Hi whendigo,

you're right, the QCustomPlot replot signals (beforeReplot/afterReplot) are only emitted for replotting the entire plot, with QCustomPlot::replot();

There is currently no signal available for the replotting of individual buffered layers. I'll take it up in the feature request list.

In the meantime the only solution for you would be to modify QCPLayer to carry an according signal, an perhaps hook it up to the parent's afterReplot signal (Qt can connect signals to other signals)