summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@nokia.com>2010-06-18 14:05:16 (GMT)
committerJocelyn Turcotte <jocelyn.turcotte@nokia.com>2010-06-30 15:54:38 (GMT)
commitf6cd0264c6e6f0bdb451e4f44284372e32e1db91 (patch)
treef9d92bfc2f1f78271f90ae9084624d434f74d699 /src/gui/widgets
parent84756e043fa2bd9c83b24abffb280290ad3667cd (diff)
downloadQt-f6cd0264c6e6f0bdb451e4f44284372e32e1db91.zip
Qt-f6cd0264c6e6f0bdb451e4f44284372e32e1db91.tar.gz
Qt-f6cd0264c6e6f0bdb451e4f44284372e32e1db91.tar.bz2
QGraphicsProxyWidget: Fixes QComboBox popup closing issue.
This happens when the QComboBox popup gets closed by QGraphicsScenePrivate::removePopup and then the QComboBox gets hidden. If the QComboBox gets shown again, the popup will be shown as well since it was not explicitly hidden. Reviewed-by: Yoann Lopes
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qcombobox.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index 1504066..dcc328f 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -704,6 +704,11 @@ void QComboBoxPrivateContainer::hideEvent(QHideEvent *)
{
emit resetButton();
combo->update();
+ // QGraphicsScenePrivate::removePopup closes the combo box popup, it hides it non-explicitly.
+ // Hiding/showing the QComboBox after this will unexpectedly show the popup as well.
+ // Re-hiding the popup container makes sure it is explicitly hidden.
+ if (QGraphicsProxyWidget *proxy = graphicsProxyWidget())
+ proxy->hide();
}
void QComboBoxPrivateContainer::mousePressEvent(QMouseEvent *e)