Let the QGraphicsView manage the focus
Rev By aseigo svn path=/trunk/KDE/kdelibs/; revision=889379
This commit is contained in:
parent
8ec20a4123
commit
1cbd228901
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user