Hi,

I am trying to create a QwtPlotPicker class that can select left and right boundary points on my QwtPlot. My original idea was to have the left mouse button select the left boundary and the right mouse button to select the right. However, when trying to implement this, I've noticed that I can only get the selected( QwtDoublePoint point ) SIGNAL function to work with only a left mouse button click. Even a CTRL+left mouse button does not emit the signal. Is it possible to have multiple button events emit the selected SIGNAL, or is it only active for QwtEventPatter::MouseSelect1? If it's the latter, I guess I would need to have independent pickers for both the left and the right boundaries?

I am running Qwt 5.2.0.

Here is my code:
Qt Code:
  1. signalPicker = new PlotPicker( canvas() );
  2. signalPicker->setSelectionFlags( QwtPicker::PointSelection | QwtPicker::ClickSelection );
  3. signalPicker->setRubberBandPen( QColor( Qt::gray ) );
  4. signalPicker->setMousePattern( QwtEventPattern::MouseSelect1, Qt::LeftButton );
  5. signalPicker->setMousePattern( QwtEventPattern::MouseSelect2, Qt::LeftButton, Qt::ControlModifier );
  6. signalPicker->setMousePattern( QwtEventPattern::MouseSelect3, Qt::RightButton );
  7. signalPicker->setMousePattern( QwtEventPattern::MouseSelect4, Qt::RightButton, Qt::ControlModifier );
  8. signalPicker->setEnabled( false );
  9. connect( signalPicker, SIGNAL( selected( QwtDoublePoint) ), this, SLOT( setSelectedPoint( QwtDoublePoint ) ) );
  10. connect( signalPicker, SIGNAL( setLeft() ), this, SLOT( setSignalLeft() ) );
  11. connect( signalPicker, SIGNAL( setRight() ), this, SLOT( setSignalRight() ) );
  12. connect( signalPicker, SIGNAL( clearLeft() ), this, SLOT( resetSignalLeft() ) );
  13. connect( signalPicker, SIGNAL( clearRight() ), this, SLOT( resetSignalRight() ) );
To copy to clipboard, switch view to plain text mode 

Thanks for your time.