diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-02-04 00:07:46 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-02-04 00:07:46 (GMT) |
commit | e1c72879ed2c25819537bc5bbb12569b705ba79f (patch) | |
tree | a27f9d00b88cfbc186ab3fa81da4185f7da1ed6e /src/declarative/graphicsitems/qmlgraphicstextedit.cpp | |
parent | efdcf95ded79ea5d745800ae86850e8c0605e9c8 (diff) | |
parent | 0a10f00d1ca93e30982b662e2d35841dab5d7bbb (diff) | |
download | Qt-e1c72879ed2c25819537bc5bbb12569b705ba79f.zip Qt-e1c72879ed2c25819537bc5bbb12569b705ba79f.tar.gz Qt-e1c72879ed2c25819537bc5bbb12569b705ba79f.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/graphicsitems/qmlgraphicstextedit.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicstextedit.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp index 6e14d3a..c3495b3 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp @@ -784,8 +784,17 @@ Handles the given mouse \a event. void QmlGraphicsTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_D(QmlGraphicsTextEdit); - if (d->focusOnPress) + if (d->focusOnPress){ + QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope? + while(p) { + if(p->flags() & QGraphicsItem::ItemIsFocusScope){ + p->setFocus(); + break; + } + p = p->parentItem(); + } setFocus(true); + } d->control->processEvent(event, QPointF(0, 0)); if (!event->isAccepted()) QmlGraphicsPaintedItem::mousePressEvent(event); |