From: Peter Penz Date: Thu, 4 Dec 2008 06:42:41 +0000 (+0000) Subject: hide tooltips when the mousewheel is used X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/b91b63bc42ee9a947a3dde99a259deb7ad8c8e97 hide tooltips when the mousewheel is used BUG: 176817 svn path=/trunk/KDE/kdebase/apps/; revision=892339 --- 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); }