*! No typing event can occur if Ctrl, Alt or Shift is pressed.

This commit is contained in:
Konstantin Isakov 2009-05-14 20:43:32 +00:00
parent e93084f96b
commit 5d95a6a17a

View file

@ -242,6 +242,10 @@ bool ArticleView::eventFilter( QObject * obj, QEvent * ev )
{ {
QKeyEvent * keyEvent = static_cast< QKeyEvent * >( ev ); QKeyEvent * keyEvent = static_cast< QKeyEvent * >( ev );
if ( keyEvent->modifiers() &
( Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier ) )
return false; // A non-typing modifier is pressed
if ( keyEvent->key() == Qt::Key_Space || if ( keyEvent->key() == Qt::Key_Space ||
keyEvent->key() == Qt::Key_Backspace || keyEvent->key() == Qt::Key_Backspace ||
keyEvent->key() == Qt::Key_Tab ) keyEvent->key() == Qt::Key_Tab )