This issue was solved in 2009: http://www.qtcentre.org/threads/1701...2169#post92169, however seems not working in 6.1.2 because of changed API. Any way to activate the rubber band without having to click the mouse in Qwt 6.1.2?
Tried following code with no luck for now - see no crosshairs:
{
// Light gray, 1 point width, dash line
canvas->setMouseTracking(true);
}
{
return new QwtPickerTrackerMachine();
}
ConstPicker::ConstPicker(QwtPlotCanvas *canvas)
: QwtPlotPicker(QwtPlot::xBottom, QwtPlot::yLeft, canvas)
{
setRubberBand(QwtPlotPicker::CrossRubberBand);
// Light gray, 1 point width, dash line
setRubberBandPen(QPen(QBrush(QColor(Qt::lightGray)), 1, Qt::DashLine));
setRubberBand(QwtPicker::CrossRubberBand);
canvas->setMouseTracking(true);
}
QwtPickerMachine *ConstPicker::stateMachine(int) const
{
return new QwtPickerTrackerMachine();
}
To copy to clipboard, switch view to plain text mode
Bookmarks