]> cloud.milkyroute.net Git - dolphin.git/commitdiff
hide tooltips when the mousewheel is used
authorPeter Penz <peter.penz19@gmail.com>
Thu, 4 Dec 2008 06:42:41 +0000 (06:42 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 4 Dec 2008 06:42:41 +0000 (06:42 +0000)
BUG: 176817

svn path=/trunk/KDE/kdebase/apps/; revision=892339

src/tooltipmanager.cpp

index e287d85b709114da66b9931c0c5f6a6b63ae719c..eb1e52ec11bdd3b2188250534758ec07181840ce 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <QApplication>
 #include <QDesktopWidget>
+#include <QScrollBar>
 #include <QTimer>
 #include <QToolTip>
 
@@ -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);
 }