┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-12-04 06:42:41 +0000
committerPeter Penz <[email protected]>2008-12-04 06:42:41 +0000
commitb91b63bc42ee9a947a3dde99a259deb7ad8c8e97 (patch)
tree158843d504cff95f680af240bfa4e20456aaad28 /src
parent22adc717eae5abfa16ea4021cbbb6ecf80c30c4a (diff)
hide tooltips when the mousewheel is used
BUG: 176817 svn path=/trunk/KDE/kdebase/apps/; revision=892339
Diffstat (limited to 'src')
-rw-r--r--src/tooltipmanager.cpp9
1 files changed, 9 insertions, 0 deletions
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 <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);
}