void ReadSonicPoint::useQwtPlotPicker()
{
auto picker = new QwtPlotPicker(ui.qwtPlot_Sonic->canvas());
picker->setStateMachine(new QwtPickerDragPointMachine());
picker->setRubberBandPen(QColor(Qt::darkMagenta));
picker->setRubberBand(QwtPicker::CrossRubberBand);
picker->setTrackerMode(QwtPicker::ActiveOnly);//被激活时候显示
picker->setTrackerPen(QColor(Qt::black));//显示实时的坐标
}
效果:
点中图像 显示坐标值