diff options
author | Nikita Krupenko <krnekit@gmail.com> | 2016-05-18 06:47:36 +0300 |
---|---|---|
committer | Nikita Krupenko <krnekit@gmail.com> | 2016-05-18 13:59:24 +0000 |
commit | 8f08885f8557099c2a37d4f3579e73f900a43cad (patch) | |
tree | d5a67c53b5f3336b22f605b4f56bd0f1aa30d479 /src/quicktemplates2/qquickcombobox.cpp | |
parent | 145ba3fd216b1d77331ef239f957360e03432d44 (diff) |
Popup: don't ignore Back key
This allows to close popup on mobile device when Back key pressed and
CloseOnEscape policy is set.
Change-Id: I97e863b462ee50d2d8e79d18cf8097f960f14227
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickcombobox.cpp')
-rw-r--r-- | src/quicktemplates2/qquickcombobox.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp index cf64ae95..c41265a4 100644 --- a/src/quicktemplates2/qquickcombobox.cpp +++ b/src/quicktemplates2/qquickcombobox.cpp @@ -781,6 +781,7 @@ void QQuickComboBox::keyPressEvent(QKeyEvent *event) switch (event->key()) { case Qt::Key_Escape: + case Qt::Key_Back: if (d->isPopupVisible()) event->accept(); break; @@ -828,6 +829,7 @@ void QQuickComboBox::keyReleaseEvent(QKeyEvent *event) event->accept(); break; case Qt::Key_Escape: + case Qt::Key_Back: d->hidePopup(false); setPressed(false); event->accept(); |