summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/qmlruntime.qdoc
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-09-03 07:43:20 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-09-03 07:43:20 (GMT)
commit044e627d0946df6dc55f616a0596bd43ff043f17 (patch)
tree170b1dc31bb8a899e4e1df1918836f3d48828098 /doc/src/declarative/qmlruntime.qdoc
parentfcf01687c7209f2b4222bd12d8fe4a871380e65b (diff)
parentfc4d386f2cc8984b98957d83d8cdb57c1105890f (diff)
downloadQt-044e627d0946df6dc55f616a0596bd43ff043f17.zip
Qt-044e627d0946df6dc55f616a0596bd43ff043f17.tar.gz
Qt-044e627d0946df6dc55f616a0596bd43ff043f17.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'doc/src/declarative/qmlruntime.qdoc')
-rw-r--r--doc/src/declarative/qmlruntime.qdoc12
1 files changed, 7 insertions, 5 deletions
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();
}