From b91b63bc42ee9a947a3dde99a259deb7ad8c8e97 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 4 Dec 2008 06:42:41 +0000 Subject: [PATCH] hide tooltips when the mousewheel is used BUG: 176817 svn path=/trunk/KDE/kdebase/apps/; revision=892339 --- src/tooltipmanager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tooltipmanager.cpp b/src/tooltipmanager.cpp index e287d85b7..eb1e52ec1 100644 --- a/src/tooltipmanager.cpp +++ b/src/tooltipmanager.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -81,6 +82,14 @@ ToolTipManager::ToolTipManager(QAbstractItemView* parent, connect(m_waitOnPreviewTimer, SIGNAL(timeout()), this, SLOT(prepareToolTip())); + // When the mousewheel is used, the items don't get a hovered indication + // (Qt-issue #200665). To assure that the tooltip still gets hidden, + // the scrollbars are observed. + connect(parent->horizontalScrollBar(), SIGNAL(valueChanged(int)), + this, SLOT(hideTip())); + connect(parent->verticalScrollBar(), SIGNAL(valueChanged(int)), + this, SLOT(hideTip())); + m_view->viewport()->installEventFilter(this); } -- 2.47.3