diff options
| author | Frederik Gladhorn <[email protected]> | 2014-10-20 19:12:23 +0200 |
|---|---|---|
| committer | Frederik Gladhorn <[email protected]> | 2014-10-20 19:12:25 +0200 |
| commit | 3361fcbc28be96262d22fd2b024c85fbcbc61462 (patch) | |
| tree | 48976f337b3885971dc1976b9a27cec5e7dfa2ec /src/gui/kernel/qevent.cpp | |
| parent | dc612acdc6577594c8f61345cea2de549d7aae34 (diff) | |
| parent | 5e342f6f041208d142d97202f61179d7163eb773 (diff) | |
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: If7e51514ed6832750e3ad967e4d322ccf920d2bb
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
| -rw-r--r-- | src/gui/kernel/qevent.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index f99f28d6e01..a8539e8013a 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -897,12 +897,11 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, when keys are pressed or released. A key event contains a special accept flag that indicates whether - the receiver will handle the key event. You should call ignore() - if the key press or release event is not handled by your widget. - A key event is propagated up the parent widget chain until a - widget accepts it with accept() or an event filter consumes it. - Key events for multimedia keys are ignored by default. You should - call accept() if your widget handles those events. + the receiver will handle the key event. This flag is set by default, + so there is no need to call accept() when acting on a key event. + Calling ignore() on a key event will propagate it to the parent widget. + The event is propagated up the parent widget chain until a widget + accepts it or an event filter consumes it. The QWidget::setEnable() function can be used to enable or disable mouse and keyboard events for a widget. |
