diff options
author | Topi Reinio <topi.reinio@digia.com> | 2014-01-09 15:29:28 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-10-13 09:33:22 +0200 |
commit | 8304c8087d269b5b48621cc18d3ebe2bd369ebf4 (patch) | |
tree | 5a5711384b190cec9cfbd36f7a05221c61604444 /src/gui/kernel/qevent.cpp | |
parent | e3bfd9bea65cc7a9e1742b0cb7ca9af22c42f730 (diff) | |
download | qtbase-8304c8087d269b5b48621cc18d3ebe2bd369ebf4.tar.gz |
Doc: Update description of QKeyEvent class
Update the description on how to use the QKeyEvent pointer
passed to key event handlers, and remove an outdated note about
multimedia key events.
Change-Id: I67a3f0054e28b84d5a0e367c02a329f4670221c7
Task-number: QTBUG-35155
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
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 f99f28d6e0..a8539e8013 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. |