summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-02-24 15:26:09 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-02-24 15:36:35 (GMT)
commit327d212f5cff81f1c21b7be5c54b3e1eab4f0ac5 (patch)
treefe56c73bb656ac0a77253f00e3524645310a7eb7 /doc
parenta343544b0fcb245cf0a0edbbce153611a6342374 (diff)
downloadQt-327d212f5cff81f1c21b7be5c54b3e1eab4f0ac5.zip
Qt-327d212f5cff81f1c21b7be5c54b3e1eab4f0ac5.tar.gz
Qt-327d212f5cff81f1c21b7be5c54b3e1eab4f0ac5.tar.bz2
Add QDeclarativeGraphicsWidget, a QGraphicsWidget version of QmlView
Could use to be renamed. Possibly to -QDeclarativeViewGraphicsWidget -QGraphicsDeclarativeViewWidget (Or QGraphicsD20, in the spirit of i18n) But those aren't any shorter. Task-number: QTBUG-7067
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/integrating.qdoc10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
index c685d3d..09ed178 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -86,6 +86,9 @@ QGraphicsObject *object =
scene->addItem(object);
\endcode
+There is a convenience QGraphicsWidget subclass, QDeclarativeGraphicsWidget, which takes care of the engine
+and component instantiation for you.
+
The following QGraphicsView options are recommended for optimal performance
of QML UIs:
@@ -95,6 +98,13 @@ of QML UIs:
\o QGraphicsScene::setItemIndexMethod(QGraphicsScene::NoIndex);
\endlist
+And the following QGraphicsView options are required for QML key handling to work:
+
+\list
+\o QGraphicsView::viewport()->setFocusPolicy(Qt::NoFocus);
+\o QGraphicsScene::setStickyFocus(true);
+\endlist
+
\section1 Using existing QGraphicsWidgets in QML
Another way of integrating with a QGraphicsView based UI is to expose your
existing QGraphicsWidgets to QML, and constructing your scene in QML. Note that