From 4f324d4655a093b406134624ff753eb518429b83 Mon Sep 17 00:00:00 2001 From: Dan Cape Date: Tue, 29 Sep 2015 09:54:24 -0400 Subject: Fix item keeping hover highlight even when mouse has left it Made change to clear the hover index when the mouse leaves the widget. This will ensure the component does not think the item still has the mouse over it. Task-number: QTBUG-46785 Change-Id: I34b7f0e171e9cf07ca23150af1b0e6e59a10a58a Reviewed-by: David Faure --- src/widgets/itemviews/qabstractitemview.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/widgets/itemviews') diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 6ecf5a664f..319cc86c18 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -1703,6 +1703,7 @@ bool QAbstractItemView::viewportEvent(QEvent *event) d->viewportEnteredNeeded = true; break; case QEvent::Leave: + d->setHoverIndex(QModelIndex()); // If we've left, no hover should be needed anymore #ifndef QT_NO_STATUSTIP if (d->shouldClearStatusTip && d->parent) { QString empty; -- cgit v1.2.3