From 1cbd228901f351ea78822da77b08997aba31e5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9nard?= Date: Wed, 26 Nov 2008 16:38:42 +0000 Subject: [PATCH] Let the QGraphicsView manage the focus Rev By aseigo svn path=/trunk/KDE/kdelibs/; revision=889379 --- applet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applet.cpp b/applet.cpp index cf52fbc5e..691059e1f 100644 --- a/applet.cpp +++ b/applet.cpp @@ -1303,7 +1303,6 @@ void Applet::mouseMoveEvent(QGraphicsSceneMouseEvent *event) void Applet::mousePressEvent(QGraphicsSceneMouseEvent *event) { - setFocus(Qt::MouseFocusReason); QGraphicsWidget::mousePressEvent(event); } @@ -1842,6 +1841,7 @@ void AppletPrivate::init() q->setCacheMode(Applet::DeviceCoordinateCache); q->setAcceptsHoverEvents(true); q->setFlag(QGraphicsItem::ItemIsFocusable, true); + q->setFocusPolicy(Qt::ClickFocus); // FIXME: adding here because nothing seems to be doing it in QGraphicsView, // but it doesn't actually work anyways =/ q->setLayoutDirection(qApp->layoutDirection());