summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qcombobox.cpp
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-11-22 10:08:34 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-12-13 12:50:11 (GMT)
commit780b4d84205f16c46f6c5e85e6c1925beb4e4dba (patch)
tree411a060d914f6e68a1cd84b9c2c309f94850182d /src/gui/widgets/qcombobox.cpp
parent3e2cb226277998a7841c85048493c89bc1ccc95f (diff)
downloadQt-780b4d84205f16c46f6c5e85e6c1925beb4e4dba.zip
Qt-780b4d84205f16c46f6c5e85e6c1925beb4e4dba.tar.gz
Qt-780b4d84205f16c46f6c5e85e6c1925beb4e4dba.tar.bz2
Cocoa: combobox does not hightlight when mouse re-hovers the first item
The reason is that on Mac, the highlight is supposed to switch off when the mouse moves out of the drop down menu. On X11, it stays. So there is a separate code path for this in qcombobox.cpp. But it fails to clear the index set in the view when the mouse leaves, which stops the item from re-highligh when the mouse re-enters. Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/widgets/qcombobox.cpp')
-rw-r--r--src/gui/widgets/qcombobox.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index 7859bdc..5a4e507 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -398,7 +398,7 @@ void QComboBoxPrivateContainer::leaveEvent(QEvent *)
#ifdef Q_WS_MAC
QStyleOptionComboBox opt = comboStyleOption();
if (combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo))
- view->clearSelection();
+ view->setCurrentIndex(QModelIndex());
#endif
}