Hi,
I have a QwtPlot showing a QwtPlotCurve and I'd like to select a desired area using a rectangular selection with "unlimited" height, in order to get all the points of my curve between two x-axis coordinates and calculate average, peak, area for this selection.
The selection should work this way: when I click in a point of my QwtPlot, a vertical "unlimited" line appears on the plot area; after this operation, moving the mouse cursor I can show a rectangle between the original position end the new one; this rectangle is automatically updated when I move the mouse cursor until I click in the desired final point, so the rectangle will be fixed on the plot area.
I've found QwtPlotPicker class, but I was only able to draw rectangular selections with limited height and this selections are not fixed.
Giving a look at the forum, I've understood that the best solution would be to create a custom class derived from QwtPlotItem and use mouse events, but I'll appreciate any suggestion and any example that can help me to achieve this goal.
Thank's in advance.
Best Regards
Salvatore
Bookmarks