From 9c0e6c20fdf84bbf933c83dd98fc29b00f9152e8 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 24 Apr 2010 19:21:04 +0000 Subject: [PATCH] hide the itembackground when the mouse leaes the toolbox svn path=/trunk/KDE/kdelibs/; revision=1118442 --- private/desktoptoolbox.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/private/desktoptoolbox.cpp b/private/desktoptoolbox.cpp index d33a100d6..b3d1c19f8 100644 --- a/private/desktoptoolbox.cpp +++ b/private/desktoptoolbox.cpp @@ -118,6 +118,16 @@ class EmptyGraphicsItem : public QGraphicsWidget return false; } + void hoverEnterEvent(QGraphicsSceneHoverEvent *event) + { + event->accept(); + } + + void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) + { + m_itemBackground->hide(); + } + private: QRectF m_rect; Plasma::FrameSvg *m_background;