I'm sorry to reopen this topic.
I have the same problem but QwtLegendItem doesn't exist now with Qwt 6.1.2! Now we only have QwtPlotLegendItem.
This line is not possible :
((QwtLegendItem*)legendList[i])->identifier().serialNumber();
To copy to clipboard, switch view to plain text mode
I just can do this but it's not ok :
QwtPlotItem *plotItem
= plot_spectre
->infoToItem
( itemInfo
);
nom_courbe = plotItem->title().text();
QwtPlotItem *plotItem = plot_spectre->infoToItem( itemInfo );
nom_courbe = plotItem->title().text();
To copy to clipboard, switch view to plain text mode
What can i do?
Maybe put the legend with QwtPlotLegendItem but i don't arrive to put on right the legend as :
insertLegend
(legend,
QwtPlot::RightLegend);
insertLegend(legend, QwtPlot::RightLegend);
To copy to clipboard, switch view to plain text mode
The legend is inside the plot.
Bookmarks