In earlier versions Qwtwe add QwtPlot::clear(), but now I can not find it.
Qwt
QwtPlot::clear()
Any ideas? I have a real-time chart, so when retransmitting information before xmin is not very important and over time it fails, because the replica relays all the information to xmin.
The method is Qwtplot::clear()deprecated. Use instead QwtPlotDict::detachItems.
Qwtplot::clear()
QwtPlotDict::detachItems
void QwtPlotDict::detachItems(int rtti = QwtPlotItem::Rtti_PlotItem, bool autoDelete = true )
Parameters:
rtti : in the case of QwtPlotItem :: Rtti_PlotItem, separate all elements, otherwise only those elements of type rtti. autoDelete : if true, delete all individual elements
, : : (m_vctTime, m_vctValue -vector) (curve = new QwtPlotCurve()) (plot = new QwtPlot ())
m_vctTime.clear(); m_vctValue.clear(); curve->setSamples(m_vctTime,m_vctValue); plot->replot();