From 3f8026932650a2dffb4e7ca82bdedc7b0e814e95 Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Wed, 23 Oct 2013 13:18:13 +0200 Subject: Make it possible to start the examples from a different dir. Change-Id: I0a640ee38d642670211b7cae30619fc18307b688 Reviewed-by: Pierre Rossi --- examples/hybridshell/main.cpp | 2 +- examples/qtobject/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') 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("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("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(); -- cgit v1.2.1