diff options
authorAllan Sandfeld Jensen <>2015-05-18 10:52:06 +0200
committerAllan Sandfeld Jensen <>2015-05-30 09:14:17 +0000
commit45751d0ea3c4325f8f8c33969015763b5b897e77 (patch)
parent71c85c554a49ed3a17167e436630ddaff2b9fcb1 (diff)
Fix combobox regression 5.4 -> 5.5
To avoid a touch release outside the combobox triggering the popup, a check was added that the combobox was hit. This fails if the combox itself is only used for the popup and associated behavior, but does not exist as widget. This patch changes the check so that only touch release checks for a hit, but a generic click still behaves as in 5.4 to avoid regressions. This fixes comboboxes no longer working in QtWebKit, since QtWebKit renders its own comboxes in webpages, and only uses the popup of the QComboBox. Task-number: QTBUG-46152 Change-Id: I74fd57b2e42e77aa4a269d812ca4a6689f254889 Reviewed-by: Florian Bruhin <> Reviewed-by: Friedemann Kleint <>
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 76f923904d..ef80e359df 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -3034,7 +3034,7 @@ void QComboBoxPrivate::showPopupFromMouseEvent(QMouseEvent *e)
QStyle::SubControl sc = q->style()->hitTestComplexControl(QStyle::CC_ComboBox, &opt, e->pos(), q);
if (e->button() == Qt::LeftButton
- && sc != QStyle::SC_None
+ && !(sc == QStyle::SC_None && e->type() == QEvent::MouseButtonRelease)
&& (sc == QStyle::SC_ComboBoxArrow || !q->isEditable())
&& !viewContainer()->isVisible()) {
if (sc == QStyle::SC_ComboBoxArrow)