Hello. I'm developing program with QwtPlot and subclass of QwtPlotZoomer. I decided to add keyboard zooming ability alongside with mouse, but it didn't work while mouse zooming worked perfectly
Qt Code:
  1. zoom->setMousePattern( QwtEventPattern::MouseSelect1, Qt::LeftButton); // zoom selection
  2. zoom->setMousePattern( QwtEventPattern::MouseSelect2, Qt::LeftButton, Qt::ControlModifier ); // zoom out to full size
  3. zoom->setMousePattern( QwtEventPattern::MouseSelect3, Qt::LeftButton, Qt::AltModifier ); // zoom out to previous size
  4. zoom->setMousePattern( QwtEventPattern::MouseSelect6, Qt::LeftButton, Qt::ControlModifier | Qt::AltModifier ); // zoom in to nex size
  5. zoom->setKeyPattern( QwtEventPattern::KeyRedo, Qt::Key_I, Qt::ShiftModifier );
  6. zoom->setKeyPattern( QwtEventPattern::KeyUndo, Qt::Key_O, Qt::ShiftModifier );
  7. zoom->setKeyPattern( QwtEventPattern::KeyHome, Qt::Key_Home );
  8. //zoom->setObjectName(QStringLiteral("%1").arg(listCurrTabGraphs.count() + 1));
  9. zoom->setZoomBase(true);
  10. zoom->setEnabled(false);
  11. zoom->setEnabled(true);
  12. zoom->canvas()->installEventFilter(this);
To copy to clipboard, switch view to plain text mode 

I installed eventFilter and saw that KeyPress events not rising

I created test application with this 2 widgets only and it worked. I have no idea how to handle this error.