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 :
Qt Code:
  1. ((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 :
Qt Code:
  1. QwtPlotItem *plotItem = plot_spectre->infoToItem( itemInfo );
  2. 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 :
Qt Code:
  1. insertLegend(legend, QwtPlot::RightLegend);
To copy to clipboard, switch view to plain text mode 
The legend is inside the plot.