summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/signal/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/extending/signal/main.cpp')
-rw-r--r--examples/declarative/extending/signal/main.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/examples/declarative/extending/signal/main.cpp b/examples/declarative/extending/signal/main.cpp
index eb3bb4b..afc1a66 100644
--- a/examples/declarative/extending/signal/main.cpp
+++ b/examples/declarative/extending/signal/main.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
#include <QCoreApplication>
-#include <QmlEngine>
-#include <QmlComponent>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
#include <QDebug>
#include "birthdayparty.h"
#include "person.h"
@@ -49,8 +49,15 @@ 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_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()) {