From a0fb0a5dd32b031f89abe603ed07a50c74327e37 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 11 Dec 2012 14:17:34 +0100 Subject: Use resource files for most examples Make examples shadow-build-friendly by using resource files instead of trying to derive the qml path from applicationDirPath(). Change-Id: I669424554c772d9b261249b366247190f5fbd8b1 Reviewed-by: Oliver Wolff --- examples/quick/scenegraph/openglunderqml/main.cpp | 2 +- examples/quick/scenegraph/openglunderqml/openglunderqml.pro | 5 ++--- examples/quick/scenegraph/openglunderqml/openglunderqml.qrc | 5 +++++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 examples/quick/scenegraph/openglunderqml/openglunderqml.qrc (limited to 'examples/quick/scenegraph/openglunderqml') diff --git a/examples/quick/scenegraph/openglunderqml/main.cpp b/examples/quick/scenegraph/openglunderqml/main.cpp index c5a68e83b1..adc389cb4c 100644 --- a/examples/quick/scenegraph/openglunderqml/main.cpp +++ b/examples/quick/scenegraph/openglunderqml/main.cpp @@ -53,7 +53,7 @@ int main(int argc, char **argv) qmlRegisterType("OpenGLUnderQML", 1, 0, "Squircle"); QQuickView view; - view.setSource(QUrl("main.qml")); + view.setSource(QUrl("qrc:///scenegraph/openglunderqml/main.qml")); view.show(); return app.exec(); diff --git a/examples/quick/scenegraph/openglunderqml/openglunderqml.pro b/examples/quick/scenegraph/openglunderqml/openglunderqml.pro index f86dd5f5f3..54558ce9e9 100644 --- a/examples/quick/scenegraph/openglunderqml/openglunderqml.pro +++ b/examples/quick/scenegraph/openglunderqml/openglunderqml.pro @@ -2,8 +2,7 @@ QT += qml quick HEADERS += squircle.h SOURCES += squircle.cpp main.cpp +RESOURCES += openglunderqml.qrc target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/openglunderqml -qml.files = main.qml -qml.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/openglunderqml -INSTALLS += target qml +INSTALLS += target diff --git a/examples/quick/scenegraph/openglunderqml/openglunderqml.qrc b/examples/quick/scenegraph/openglunderqml/openglunderqml.qrc new file mode 100644 index 0000000000..d166ea9d37 --- /dev/null +++ b/examples/quick/scenegraph/openglunderqml/openglunderqml.qrc @@ -0,0 +1,5 @@ + + + main.qml + + -- cgit v1.2.3