QComboBox: Fix hover over list view

9da8d67b3bca1d40ae221a9c6be218fe57759724 has commented out setting the
current index of the combo box container during a mouse hover event.
That has caused a regression.

Amend the patch and enable visual hover effect.

Fixes: QTBUG-120167
Pick-to: 6.7
Change-Id: Ic12e70f9f70ac2f7b9604580562c35551659c5e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Axel Spoerl 2023-12-20 15:14:17 +01:00
parent 8fe920ccb0
commit a5a082406e

View File

@ -761,9 +761,7 @@ bool QComboBoxPrivateContainer::eventFilter(QObject *o, QEvent *e)
QModelIndex indexUnderMouse = view->indexAt(m->position().toPoint());
if (indexUnderMouse.isValid()
&& !QComboBoxDelegate::isSeparator(indexUnderMouse)) {
// Request for comments: To show selected item with AccentColor bar indicator and hovered
// items in the flyout, the next line needs to be removed.
//view->setCurrentIndex(indexUnderMouse);
view->setCurrentIndex(indexUnderMouse);
}
}
break;