summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorDan Cape <dcape@qnx.com>2015-09-29 09:54:24 -0400
committerDan Cape <dcape@qnx.com>2017-03-13 15:47:10 +0000
commit4f324d4655a093b406134624ff753eb518429b83 (patch)
tree7cfd89df87706bfede5afa747719076f69865301 /src/widgets
parentedf0be818cde51fcd47295171c65efd82b67ba65 (diff)
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 <david.faure@kdab.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp1
1 files changed, 1 insertions, 0 deletions
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;