I'm trying to change the mode of the QwtPoltLegendItem , so i can click on it and display the curve related to each item on the legend. so is there a way to change the item mode for QwtPoltLegendItem or not ??
Plot items are no widgets - they can't have a focus and they don't get any mouse or key events.
You could implement an event filter for the canvas ( or with SVN trunk you can overload its mousePressEvent ) where you handle mouse clicks yourself. The geometries of the legend entries are available.
Another option is to use an external legend - what means a legend that is not known to the layout system of the plot. Then you can put it on top of the canvas manually using QWidget:.setGeometry(). With Qwt 6.0 you would have to insert the legend as QwtPlot::ExternalLegend, with SVN trunk you have to setup a signal/slot connection instead: see the legends example. But note that you will also have to implement some code to layout the legend, when you want to export/print the plot.
Sorry, one more thing is how can i remove a curve from the legend even though still attached to the plot ?
curve->setItemAttribute( QwtPlotItem::Legend, false );
To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks