qcustomplot库对replot()的解释:
void QCustomPlot::replot
(
QCustomPlot::RefreshPriority
refreshPriority = QCustomPlot::rpRefreshHint
)
Causes a complete replot into the internal paint buffer(s).
Finally, the widget surface is refreshed with the new buffer contents. This is the method that must be called to make changes to the plot, e.g. on the axis ranges or data points of graphs, visible.
The parameter refreshPriority can be used to fine-tune the timing of the replot.
For example if your application calls replot very quickly in succession
(e.g. multiple independent functions change some aspects of the plot and each wants to make sure the change gets replotted),
it is advisable to set refreshPriority to QCustomPlot::rpQueuedReplot. This way, the actual replotting is deferred to the next event loop iteration.
Multiple successive calls of replot with this priority will only cause a single replot, avoiding redundant replots and improv