summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2019-01-07 14:55:58 +0100
committerMitch Curtis <mitch.curtis@qt.io>2019-01-10 10:45:53 +0000
commit574b56913f3d1ca6ad05617c32bd275807613c6b (patch)
tree3d4706b3a9ad918ae7feb75e0bdf30c9284530e2 /src/widgets/widgets
parent68511d41d50b1a136fb0e74fdabfd362e0b21a1a (diff)
Doc: mention that some filtered events need to be explicitly accepted
QKeyEvent's detailed description already documents this: "A key event contains a special accept flag that indicates whether the receiver will handle the key event. This flag is set by default for QEvent::KeyPress and QEvent::KeyRelease, so there is no need to call accept() when acting on a key event. For QEvent::ShortcutOverride the receiver needs to explicitly accept the event to trigger the override. 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." However, someone looking at eventFilter() won't see this, resulting in the shortcut not being consumed and propagating elsewhere, so mention it in the docs for eventFilter() too. Change-Id: I14fece52133be641ccdabd81f75706cd10b64669 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/widgets/widgets')
0 files changed, 0 insertions, 0 deletions