There's been some changes in Qwt 6 comparing to 5.
Now we need to set state machine using QwtPlotPicker::setStateMachine(QwtPickerMachine)
method. There are a few options (derived classes):
QwtPickerClickPointMachine
QwtPickerClickRectMachine
QwtPickerDragPointMachine
QwtPickerDragRectMachine
QwtPickerPolygonMachine
QwtPickerTrackerMachine
depending on our needs.
Next thing we need to do is connect()
signal selected(...)
from QwtPlotPicker
with our custom slot where we can obtain x and y coordinates or other interesting data.