summaryrefslogtreecommitdiff
path: root/examples/hybridshell/main.cpp
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2013-12-28 17:02:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-08 15:04:53 +0100
commitb86be10882236d269817c42daa1bc3fa49fe78af (patch)
tree5bfcc46e520daa8e0bd6c230bf83ac6360fad083 /examples/hybridshell/main.cpp
parent4d3167b97b8e48a9fcdb1c2b86467d75e7d669eb (diff)
downloadqtwebchannel-b86be10882236d269817c42daa1bc3fa49fe78af.tar.gz
Fixup and cleanup examples to make them work properly.
This fixes some regressions introduced by previous commits and ensures that the examples work as intended. While at it, the code is cleaned up a bit by using resources instead of referencing files in the source dir. Change-Id: I01da305429dcdebcb96284b7110c59f3090b2201 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'examples/hybridshell/main.cpp')
-rw-r--r--examples/hybridshell/main.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/hybridshell/main.cpp b/examples/hybridshell/main.cpp
index d57966f..8c7e9b0 100644
--- a/examples/hybridshell/main.cpp
+++ b/examples/hybridshell/main.cpp
@@ -41,11 +41,10 @@
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
- qmlRegisterType<Shell>("Qt.labs", 1, 0, "HybridShell");
+ qmlRegisterType<Shell>("QtWebChannel.Examples", 1, 0, "HybridShell");
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();