┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphindetailsview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-04-16 20:26:21 +0000
committerPeter Penz <[email protected]>2008-04-16 20:26:21 +0000
commiteb36093c2c5a8782c7c7f6be92881c108c30a5b1 (patch)
tree12e4fe072f7b5388f5e4c357a726061bd82734de /src/dolphindetailsview.cpp
parent12c1feb0c5ac8d402ee03dc9da39f826ae04ce0b (diff)
if the mouse is above an item and moved very fast outside the widget, no viewportEntered() signal might be emitted although the mouse has been moved above the viewport
svn path=/trunk/KDE/kdebase/apps/; revision=797742
Diffstat (limited to 'src/dolphindetailsview.cpp')
-rw-r--r--src/dolphindetailsview.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp
index 470cafa1d..aef034df1 100644
--- a/src/dolphindetailsview.cpp
+++ b/src/dolphindetailsview.cpp
@@ -134,6 +134,7 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr
updateDecorationSize();
setFocus();
+ viewport()->installEventFilter(this);
connect(KGlobalSettings::self(), SIGNAL(kdisplayFontChanged()),
this, SLOT(updateFont()));
@@ -363,6 +364,18 @@ void DolphinDetailsView::currentChanged(const QModelIndex& current, const QModel
}
}
+bool DolphinDetailsView::eventFilter(QObject* watched, QEvent* event)
+{
+ if ((watched == viewport()) && (event->type() == QEvent::Leave)) {
+ // if the mouse is above an item and moved very fast outside the widget,
+ // no viewportEntered() signal might be emitted although the mouse has been moved
+ // above the viewport
+ m_controller->emitViewportEntered();
+ }
+
+ return QTreeView::eventFilter(watched, event);
+}
+
void DolphinDetailsView::setSortIndicatorSection(DolphinView::Sorting sorting)
{
QHeaderView* headerView = header();