gpt4 book ai didi

c++ - 如何在重新绘制之前清除 QwtPlot 曲线?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:25:26 25 4
gpt4 key购买 nike

Qwt 的早期版本中,我们添加了 QwtPlot::clear() 但现在,我找不到它了。

有什么想法吗?我有一个实时绘图,所以在重新绘图时,xmin 之前的信息并不是很重要,并且随着时间的推移它会崩溃,因为重新绘图正在重新绘制 xmin 之前的所有信息。

最佳答案

Qwtplot::clear() 方法已被弃用。请改用 QwtPlotDict::detachItems

void QwtPlotDict::detachItems(int rtti = QwtPlotItem::Rtti_PlotItem, 
bool autoDelete = true
)

参数:

rtti: In case of QwtPlotItem::Rtti_PlotItem detach all items otherwise only those items of the type rtti. autoDelete: If true, delete all detached items

关于c++ - 如何在重新绘制之前清除 QwtPlot 曲线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15385561/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com