summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-04 00:45:55 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-04 00:45:55 (GMT)
commit1c21463aca94051a5c5e293bd9d5f6da8c491bf9 (patch)
tree7f854be4b23147f3a9e622c008dba499d609d5f0 /src
parent68bc94ee824d8ceaaa272b7176f3810337addee7 (diff)
downloadQt-1c21463aca94051a5c5e293bd9d5f6da8c491bf9.zip
Qt-1c21463aca94051a5c5e293bd9d5f6da8c491bf9.tar.gz
Qt-1c21463aca94051a5c5e293bd9d5f6da8c491bf9.tar.bz2
Set StrongFocus on QDeclarativeView so that elements can get focus.
Task-number: QTBUG-8637
Diffstat (limited to 'src')
-rw-r--r--src/declarative/util/qdeclarativeview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index f08e634..cd67aeb 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -194,6 +194,7 @@ void QDeclarativeViewPrivate::execute()
\o Initializes QGraphicsView for QML key handling:
\list
\o QGraphicsView::viewport()->setFocusPolicy(Qt::NoFocus);
+ \o QGraphicsView::setFocusPolicy(Qt::StrongFocus);
\o QGraphicsScene::setStickyFocus(true);
\endlist
\endlist
@@ -268,6 +269,7 @@ void QDeclarativeViewPrivate::init()
q->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
scene.setItemIndexMethod(QGraphicsScene::NoIndex);
q->viewport()->setFocusPolicy(Qt::NoFocus);
+ q->setFocusPolicy(Qt::StrongFocus);
scene.setStickyFocus(true); //### needed for correct focus handling
}