diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-16 03:00:59 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-16 03:01:00 +0200 |
commit | 8b61881469901a793e9ac8eec7caefad547258a2 (patch) | |
tree | fc85f58a91776cfe1f57f2cdf7f1267833041eec /src/quicktemplates2/qquickcombobox.cpp | |
parent | d1fdbd128f6e95255c7d9fc20ef07f44677a649e (diff) | |
parent | ced7d5af9caeedd7b3a2278b052a0b0f7bf951b7 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ica87b5aac6a7ca335acd9c5da998cc1831347420
Diffstat (limited to 'src/quicktemplates2/qquickcombobox.cpp')
-rw-r--r-- | src/quicktemplates2/qquickcombobox.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp index 09b5e376..0ffd76ab 100644 --- a/src/quicktemplates2/qquickcombobox.cpp +++ b/src/quicktemplates2/qquickcombobox.cpp @@ -1556,10 +1556,10 @@ bool QQuickComboBox::eventFilter(QObject *object, QEvent *event) break; } case QEvent::FocusOut: - if (qGuiApp->focusObject() != this) { + if (qGuiApp->focusObject() != this && (!d->popup || !d->popup->hasActiveFocus())) { // Only close the popup if focus was transferred somewhere else - // than to the popup button (which normally means that the user - // clicked on the popup button to open it, not close it. + // than to the popup or the popup button (which normally means that + // the user clicked on the popup button to open it, not close it). d->hidePopup(false); setPressed(false); } @@ -1589,9 +1589,9 @@ void QQuickComboBox::focusOutEvent(QFocusEvent *event) Q_D(QQuickComboBox); QQuickControl::focusOutEvent(event); - if (qGuiApp->focusObject() != d->contentItem) { + if (qGuiApp->focusObject() != d->contentItem && (!d->popup || !d->popup->hasActiveFocus())) { // Only close the popup if focus was transferred - // somewhere else than to the inner line edit (which is + // somewhere else than to the popup or the inner line edit (which is // normally done from QQuickComboBox::focusInEvent). d->hidePopup(false); setPressed(false); |