I get this error:
error
: request
for member ‘find’ in ‘legend’, which is of non
-class type ‘
QwtLegend*’
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:
legend
->setItemMode
( QwtLegend::CheckableItem );
myPlot
->insertLegend
(legend,
QwtPlot::BottomLegend);
//main Curve
mainCurve
->setRenderHint
(QwtPlotItem::RenderAntialiased);
mainCurve
->setPen
(QPen(Qt
::black));
mainCurve
->setLegendAttribute
(QwtPlotCurve::LegendShowLine);
label->setChecked(true);
QwtLegend *legend = new QwtLegend;
legend->setItemMode( QwtLegend::CheckableItem );
myPlot->insertLegend(legend, QwtPlot::BottomLegend);
//main Curve
mainCurve = new QwtPlotCurve("mainCurve");
mainCurve->setRenderHint(QwtPlotItem::RenderAntialiased);
mainCurve->setPen(QPen(Qt::black));
mainCurve->setLegendAttribute(QwtPlotCurve::LegendShowLine);
QwtLegendItem* label = (QwtLegendItem*)legend.find(&mainCurve);
label->setChecked(true);
To copy to clipboard, switch view to plain text mode
Bookmarks