diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-05-19 23:36:07 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-05-19 23:36:07 (GMT) |
commit | cc51d0f166354ad5acdc5ce054a83a02eeb21229 (patch) | |
tree | ac566448f16a976003e7bc9849c290da85a883ac /doc | |
parent | 06cfcc9c8a328648d1000cc9fb1767a1b3e4d013 (diff) | |
download | Qt-cc51d0f166354ad5acdc5ce054a83a02eeb21229.zip Qt-cc51d0f166354ad5acdc5ce054a83a02eeb21229.tar.gz Qt-cc51d0f166354ad5acdc5ce054a83a02eeb21229.tar.bz2 |
Fix docs.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/declarative/qmlforcpp.qdoc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/src/declarative/qmlforcpp.qdoc b/doc/src/declarative/qmlforcpp.qdoc index e29b962..2898499 100644 --- a/doc/src/declarative/qmlforcpp.qdoc +++ b/doc/src/declarative/qmlforcpp.qdoc @@ -28,7 +28,8 @@ based on a simple declarative component description. \code - QmlComponent redRectangle("Rect { color: \"red\"; width: 100; height: 100 }"); + QmlEngine engine; + QmlComponent redRectangle(&engine, "Rect { color: \"red\"; width: 100; height: 100 }"); for (int ii = 0; ii < 100; ++ii) { QObject *rectangle = redRectangle.create(); // ... do something with the rectangle ... @@ -581,7 +582,8 @@ \row \o \code - QmlComponent component(xmlData); + QmlEngine engine; + QmlComponent component(&engine, qmlData); QObject *object = component.create(); // Will print "Hello world!" qDebug() << object->property("text2"); |