aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-05-31 16:00:04 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-09-11 13:39:23 +0000
commit2e8c6a58e2b5691f5fba3f8f10125a5fee14ea05 (patch)
treea341f6cd86f2b737bcfbdd8ae94b86be81571451 /src
parent903264891a2330c8c8cc19d297730c1891c16944 (diff)
QQuickComboBox: fix attached Keys signal handlers when editable
Task-number: QTBUG-61135 Change-Id: I3f00cb81eeacbbddecc04d206bf13e602de15af7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquickcombobox.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp
index dceda7d7..48d75f88 100644
--- a/src/quicktemplates2/qquickcombobox.cpp
+++ b/src/quicktemplates2/qquickcombobox.cpp
@@ -1422,9 +1422,12 @@ bool QQuickComboBox::eventFilter(QObject *object, QEvent *event)
d->hidePopup(false);
break;
case QEvent::KeyPress: {
- const int key = static_cast<QKeyEvent *>(event)->key();
+ QKeyEvent *ke = static_cast<QKeyEvent *>(event);
+ if (d->filterKeyEvent(ke, false))
+ return true;
+ event->accept();
if (d->extra.isAllocated())
- d->extra->allowComplete = key != Qt::Key_Backspace && key != Qt::Key_Delete;
+ d->extra->allowComplete = ke->key() != Qt::Key_Backspace && ke->key() != Qt::Key_Delete;
break;
}
case QEvent::FocusOut: