diff options
Diffstat (limited to 'examples/qtobject/main.cpp')
-rw-r--r-- | examples/qtobject/main.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/qtobject/main.cpp b/examples/qtobject/main.cpp index f11f4ba..4436862 100644 --- a/examples/qtobject/main.cpp +++ b/examples/qtobject/main.cpp @@ -41,12 +41,11 @@ int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); - qmlRegisterType<TestObjectFactory>("Qt.labs", 1, 0, "TestObjectFactory"); - qmlRegisterType<TestObject>("Qt.labs", 1, 0, "TestObject"); + qmlRegisterType<TestObjectFactory>("QtWebChannel.Examples", 1, 0, "TestObjectFactory"); + qmlRegisterType<TestObject>("QtWebChannel.Examples", 1, 0, "TestObject"); QQuickView viewer; - viewer.engine()->addImportPath(app.applicationDirPath() + QStringLiteral("/../../src/")); - viewer.setSource(QUrl::fromLocalFile(QStringLiteral(SOURCE_DIR) + QStringLiteral("/main.qml"))); + viewer.setSource(QStringLiteral("qrc:/main.qml")); viewer.show(); return app.exec(); |