I get this error:


Qt Code:
  1. error: request for member ‘find’ in ‘legend’, which is of non-class type ‘QwtLegend*’
To copy to clipboard, switch view to plain text mode 

I use your command lines like this:
Qt Code:
  1. QwtLegend *legend = new QwtLegend;
  2. legend->setItemMode( QwtLegend::CheckableItem );
  3. myPlot->insertLegend(legend, QwtPlot::BottomLegend);
  4.  
  5. //main Curve
  6. mainCurve = new QwtPlotCurve("mainCurve");
  7. mainCurve->setRenderHint(QwtPlotItem::RenderAntialiased);
  8. mainCurve->setPen(QPen(Qt::black));
  9. mainCurve->setLegendAttribute(QwtPlotCurve::LegendShowLine);
  10. QwtLegendItem* label = (QwtLegendItem*)legend.find(&mainCurve);
  11. label->setChecked(true);
To copy to clipboard, switch view to plain text mode