diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2013-10-23 13:18:13 +0200 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@gmail.com> | 2013-11-01 13:57:53 +0100 |
commit | 3f8026932650a2dffb4e7ca82bdedc7b0e814e95 (patch) | |
tree | b888519d10310bf04a433415ce880437b27a489a | |
parent | a607c948860782b5a095fe802f3acdd5aaf6a568 (diff) | |
download | qtwebchannel-3f8026932650a2dffb4e7ca82bdedc7b0e814e95.tar.gz |
Make it possible to start the examples from a different dir.
Change-Id: I0a640ee38d642670211b7cae30619fc18307b688
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
-rw-r--r-- | examples/hybridshell/main.cpp | 2 | ||||
-rw-r--r-- | examples/qtobject/main.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/hybridshell/main.cpp b/examples/hybridshell/main.cpp index ce7f463..949bb65 100644 --- a/examples/hybridshell/main.cpp +++ b/examples/hybridshell/main.cpp @@ -12,7 +12,7 @@ int main(int argc, char *argv[]) qmlRegisterType<Shell>("Qt.labs", 1, 0, "HybridShell"); QtQuick2ApplicationViewer viewer; - viewer.setMainQmlFile(QStringLiteral("qml/hybridshell/main.qml")); + viewer.setMainQmlFile(app.applicationDirPath() + QStringLiteral("/qml/hybridshell/main.qml")); viewer.showExpanded(); return app.exec(); diff --git a/examples/qtobject/main.cpp b/examples/qtobject/main.cpp index fe8efff..b816f0e 100644 --- a/examples/qtobject/main.cpp +++ b/examples/qtobject/main.cpp @@ -11,7 +11,7 @@ int main(int argc, char *argv[]) qmlRegisterType<TestObject>("Qt.labs", 1, 0, "TestObject"); QtQuick2ApplicationViewer viewer; - viewer.setMainQmlFile(QStringLiteral("qml/qtobject/main.qml")); + viewer.setMainQmlFile(app.applicationDirPath() + QStringLiteral("/qml/qtobject/main.qml")); viewer.showExpanded(); return app.exec(); |