summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-09-03 12:12:52 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-09-03 12:12:52 (GMT)
commitcb80c41e7bced1877312468e7f65e3a561e7d161 (patch)
tree4f8b9d8008b12e9c810705e8254182e2423310a3 /doc/src/declarative
parentaacf7c5a8b98f0dd4039d7f7a9d0471c32034a3b (diff)
parentca68786e62e0e645b692dc19a87b7dc3b2219ffd (diff)
downloadQt-cb80c41e7bced1877312468e7f65e3a561e7d161.zip
Qt-cb80c41e7bced1877312468e7f65e3a561e7d161.tar.gz
Qt-cb80c41e7bced1877312468e7f65e3a561e7d161.tar.bz2
Merge branch '4.7' into qmldocs
Conflicts: doc/src/snippets/declarative/qml-intro/basic-syntax.qml
Diffstat (limited to 'doc/src/declarative')
-rw-r--r--doc/src/declarative/qml-intro.qdoc7
-rw-r--r--doc/src/declarative/qmlruntime.qdoc12
2 files changed, 13 insertions, 6 deletions
diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc
index 63d6825..9130be0 100644
--- a/doc/src/declarative/qml-intro.qdoc
+++ b/doc/src/declarative/qml-intro.qdoc
@@ -58,7 +58,12 @@ would be a property.
The basic syntax of an \l{QML Elements}{element} is
-\snippet doc/src/snippets/declarative/qml-intro/basic-syntax.qml basic syntax
+\code
+SomeElement {
+ id: myObject
+ ... some other things here ...
+}
+\endcode
Here we are defining a new object. We specify its 'type' first as SomeElement.
Then within matching braces { ... } we specify the various parts of our
diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc
index d44e774..9a84237 100644
--- a/doc/src/declarative/qmlruntime.qdoc
+++ b/doc/src/declarative/qmlruntime.qdoc
@@ -104,20 +104,22 @@ can be constructed directly instead. In this case, \c application.qml is
loaded as a QDeclarativeComponent instance rather than placed into a view:
\code
- #include <QCoreApplication>
+ #include <QApplication>
#include <QDeclarativeEngine>
+ #include <QDeclarativeContext>
+ #include <QDeclarativeComponent>
int main(int argc, char *argv[])
{
- QCoreApplication app(argc, argv);
+ QApplication app(argc, argv);
QDeclarativeEngine engine;
- QDeclarativeContext *windowContext = new QDeclarativeContext(engine.rootContext());
+ QDeclarativeContext *objectContext = new QDeclarativeContext(engine.rootContext());
QDeclarativeComponent component(&engine, "application.qml");
- QObject *window = component.create(windowContext);
+ QObject *object = component.create(objectContext);
- // ... delete window and windowContext when necessary
+ // ... delete object and objectContext when necessary
return app.exec();
}