ignore() key press event for keys not handled

(cherry picked from commit 6e208cf0cc60d3e7016a3bbdbb6dfd3c1b105186)
This commit is contained in:
Lasse Liehu 2011-02-10 21:01:29 +02:00
parent beb1f9b6cf
commit d0e8d977b4

View File

@ -607,8 +607,10 @@ public:
void handleKeyPressEvent(QKeyEvent *event) void handleKeyPressEvent(QKeyEvent *event)
{ {
if (!widget.data()) if (!widget.data()) {
event->ignore();
return; return;
}
QPointF start = q->scrollPosition(); QPointF start = q->scrollPosition();
QPointF end = start; QPointF end = start;
@ -637,7 +639,8 @@ public:
} }
break; break;
default: default:
break; event->ignore();
return;
} }
fixupAnimation.groupX->stop(); fixupAnimation.groupX->stop();