How to keep the selection box using QwtPlotPicker, even after rezooming
I have made a custom drawRubberBand method in my custom picker class.
The selection box is customized so that it paints a vertically expanded solid box
Code:
void GraphWindow
::HorizontalPicker::drawRubberBand(QPainter *p
) const {
const QRect pRect
= pickArea
().
boundingRect().
toRect();
QRect r
= QRect(poly.
point(0).
x(),
2, poly.
point(1).
x() - poly.
point(0).
x(), pRect.
height() - 2);
}
This works great, however I would like that the box remained in the plot until a new selection is made or the selection is manually removed. Also the selection should be able to scroll and zoom with the plot showing what of the plot that is selected. How can I add this functionality.
Re: How to keep the selection box using QwtPlotPicker, even after rezooming
Re: How to keep the selection box using QwtPlotPicker, even after rezooming
Insert a QwtPlotShapeItem when the selection is done.
Uwe