summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/valuesource/main.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-03-01 14:06:02 (GMT)
committeraxis <qt-info@nokia.com>2010-03-01 14:06:02 (GMT)
commit88a36e9e7e0e0bc09788c41ab6b968031dbc9154 (patch)
tree947663f695f54a0deb2724116f82d89fde761576 /examples/declarative/extending/valuesource/main.cpp
parent4be1e01c6faebe11bfe205c1b910049747b5c335 (diff)
parentca82ee4ee55e52c75326949148455af1095df014 (diff)
downloadQt-88a36e9e7e0e0bc09788c41ab6b968031dbc9154.zip
Qt-88a36e9e7e0e0bc09788c41ab6b968031dbc9154.tar.gz
Qt-88a36e9e7e0e0bc09788c41ab6b968031dbc9154.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts: configure mkspecs/common/symbian/symbian.conf qmake/generators/symbian/initprojectdeploy_symbian.cpp qmake/generators/symbian/symmake_abld.cpp qmake/generators/symbian/symmake_sbsv2.cpp src/plugins/plugins.pro
Diffstat (limited to 'examples/declarative/extending/valuesource/main.cpp')
-rw-r--r--examples/declarative/extending/valuesource/main.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/examples/declarative/extending/valuesource/main.cpp b/examples/declarative/extending/valuesource/main.cpp
index ba38e82..873f8c9 100644
--- a/examples/declarative/extending/valuesource/main.cpp
+++ b/examples/declarative/extending/valuesource/main.cpp
@@ -39,18 +39,27 @@
**
****************************************************************************/
#include <QCoreApplication>
-#include <QmlEngine>
-#include <QmlComponent>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
#include <QDebug>
#include "birthdayparty.h"
+#include "happybirthday.h"
#include "person.h"
int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
- QmlEngine engine;
- QmlComponent component(&engine, ":example.qml");
+ QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached);
+ QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
+ QML_REGISTER_TYPE(People, 1,0, HappyBirthday, HappyBirthday);
+ QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
+ QML_REGISTER_NOCREATE_TYPE(Person);
+ QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
+ QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
if (party && party->celebrant()) {