summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qmlgraphicstextedit.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-02-04 03:39:58 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-02-04 03:39:58 (GMT)
commit4c8b9316de5728276d24f2d72599cf9c6534fced (patch)
treeb726d4826db4d98fd355f0c2c8a69229cf790b6a /src/declarative/graphicsitems/qmlgraphicstextedit.cpp
parent0b8ef5c78b724901cfae343920b3e9e8f4a78fda (diff)
parente1c72879ed2c25819537bc5bbb12569b705ba79f (diff)
downloadQt-4c8b9316de5728276d24f2d72599cf9c6534fced.zip
Qt-4c8b9316de5728276d24f2d72599cf9c6534fced.tar.gz
Qt-4c8b9316de5728276d24f2d72599cf9c6534fced.tar.bz2
Merge branch 'kinetic-declarativeui' of 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.cpp11
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);