diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-13 03:00:59 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-13 03:00:59 +0200 |
commit | ced7d5af9caeedd7b3a2278b052a0b0f7bf951b7 (patch) | |
tree | 71a123c1058574f9213936c01a0e59cc6e87f33f /src/quicktemplates2/qquickcombobox.cpp | |
parent | 131210b59133fcebe0ab3c7823777f2b859dc7cd (diff) | |
parent | bd126fdea95ed994fdd35d50e445b45af75657ab (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta3
Change-Id: Ice7d2ed56c85521a946b218d84087b255d3613ae
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 03dd6086..328797b8 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); |