diff options
author | Jan Arve Sæther <jan-arve.saether@qt.io> | 2018-11-21 11:34:32 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2018-12-13 17:53:19 +0000 |
commit | 0a92b02f1784a8934490633edcfed79fc685bfa2 (patch) | |
tree | 2686826b9c64dc7e760ae5a2a169b13658a48e0d /src/quick/items/qquicktextedit.cpp | |
parent | 9929c250a3829aec82955da91413bc7673dc159d (diff) |
Fix Keys.onShortcutOverride for TextEdit
It was not possible to override a shortcut with Keys.onShortcutOverride
for TextEdit. This was because the ShortcutOverride event sent to the
TextEdit was not passed on to the default event() implementation (of the
base class) in the case that the QQuickTextEdit did not handle the
ShortcutOverride event.
Fixes: QTBUG-68711
Change-Id: I981738d8f92c77eadb8dd98b4245290d430525d3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/quick/items/qquicktextedit.cpp')
-rw-r--r-- | src/quick/items/qquicktextedit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 06a0fc396b..3a12ad6ba5 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -1641,7 +1641,8 @@ bool QQuickTextEdit::event(QEvent *event) Q_D(QQuickTextEdit); if (event->type() == QEvent::ShortcutOverride) { d->control->processEvent(event, QPointF(-d->xoff, -d->yoff)); - return event->isAccepted(); + if (event->isAccepted()) + return true; } return QQuickImplicitSizeItem::event(event); } |