2

In my QwtPlot object I have some curves plotted and a QwtPlotPicker (derived from the curvetracker class from the Qwt playground).

How can I clear it all?

I need to remove the curves, hide the axes and remove the QwtPlotPicker.

I can remove the curves with the following command:

myQwtPlot->detachItems(QwtPlotItem::Rtti_PlotItem, true);

And I can hide/disable the axes with the following commands:

myQwtPlot->enableAxis(QwtPlot::xBottom, false);
myQwtPlot->enableAxis(QwtPlot::yLeft, false);

But I don't know how to remove the QwtPlotPicker. If I just remove the curves and move the mouse over my QwtPlot my application crashes.

Thanks

KelvinS
  • 2,870
  • 8
  • 34
  • 67

1 Answers1

0

I solved the problem by disabling my QwtPlotPicker:

myQwtPlotPicker->setEnabled(false);

I don't know if it is the best/right solution, but it worked.

Anyway, if anyone knows a better way to do so please let me know.

KelvinS
  • 2,870
  • 8
  • 34
  • 67