I realized there are a couple of errors in the code I posted. In the two case statements, if the mouse button press doesn't match the mouse pattern, then they get thrown away. This is wrong; the event should be passed up to the base class for it to handle instead. So, fix the code in both places by adding this:

Qt Code:
  1. QwtPickerMachine::CommandList MyQwtPickerMachine::transition( const QwtEventPattern & eventPattern, const QEvent * pEvent )
  2. {
  3. QwtPickerMachine::CommandList cmdList;
  4.  
  5. switch( pEvent->type() )
  6. {
  7. case QEvent::MouseButtonPress:
  8. {
  9. if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, (const QMouseEvent *)pEvent ) )
  10. {
  11. //... same as original code
  12. }
  13. else // These two lines are new; add the same thing to the double-click case
  14. cmdList = QwtPickerClickPointMachine::transition( eventPattern, pEvent );
  15. }
  16. break;
  17.  
  18. default:
  19. cmdList = QwtPickerClickPointMachine::transition( eventPattern, pEvent );
  20. break;
  21. }
  22. return cmdList;
  23. }
To copy to clipboard, switch view to plain text mode