aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/canvas
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2012-12-11 14:17:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-12 10:32:50 +0100
commita0fb0a5dd32b031f89abe603ed07a50c74327e37 (patch)
tree04dd8b801c1e5daca81701542a8f6815c8b35274 /examples/quick/canvas
parentb570d384c0704ea12364e353493eeb6f1ae34cd3 (diff)
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 <oliver.wolff@digia.com>
Diffstat (limited to 'examples/quick/canvas')
-rw-r--r--examples/quick/canvas/canvas.pro7
-rw-r--r--examples/quick/canvas/canvas.qrc32
-rw-r--r--examples/quick/canvas/main.cpp2
3 files changed, 37 insertions, 4 deletions
diff --git a/examples/quick/canvas/canvas.pro b/examples/quick/canvas/canvas.pro
index d721805abd..4c4140407b 100644
--- a/examples/quick/canvas/canvas.pro
+++ b/examples/quick/canvas/canvas.pro
@@ -2,8 +2,9 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
+RESOURCES += \
+ canvas.qrc \
+ ../shared/shared.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/canvas
-qml.files = canvas.qml bezierCurve clip quadraticCurveTo roundedrect smile squircle tiger contents
-qml.path = $$[QT_INSTALL_EXAMPLES]/quick/canvas
-INSTALLS += target qml
+INSTALLS += target
diff --git a/examples/quick/canvas/canvas.qrc b/examples/quick/canvas/canvas.qrc
new file mode 100644
index 0000000000..06d39f3624
--- /dev/null
+++ b/examples/quick/canvas/canvas.qrc
@@ -0,0 +1,32 @@
+<RCC>
+ <qresource prefix="/canvas">
+ <file>canvas.qml</file>
+ <file>bezierCurve/bezierCurve.qml</file>
+ <file>clip/clip.qml</file>
+ <file>contents/Button.qml</file>
+ <file>contents/qt-logo.png</file>
+ <file>contents/ScrollBar.qml</file>
+ <file>contents/Slider.qml</file>
+ <file>contents/TitleBar.qml</file>
+ <file>contents/ToolBar.qml</file>
+ <file>contents/images/button-pressed.png</file>
+ <file>contents/images/button.png</file>
+ <file>contents/images/default.svg</file>
+ <file>contents/images/gloss.png</file>
+ <file>contents/images/lineedit.png</file>
+ <file>contents/images/lineedit.sci</file>
+ <file>contents/images/quit.png</file>
+ <file>contents/images/stripes.png</file>
+ <file>contents/images/titlebar.png</file>
+ <file>contents/images/titlebar.sci</file>
+ <file>contents/images/toolbutton.png</file>
+ <file>contents/images/toolbutton.sci</file>
+ <file>quadraticCurveTo/quadraticCurveTo.qml</file>
+ <file>roundedrect/roundedrect.qml</file>
+ <file>smile/smile.qml</file>
+ <file>squircle/squircle.png</file>
+ <file>squircle/squircle.qml</file>
+ <file>tiger/tiger.js</file>
+ <file>tiger/tiger.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/canvas/main.cpp b/examples/quick/canvas/main.cpp
index 52c62ace12..9b2fda197d 100644
--- a/examples/quick/canvas/main.cpp
+++ b/examples/quick/canvas/main.cpp
@@ -38,4 +38,4 @@
**
****************************************************************************/
#include "../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(canvas) \ No newline at end of file
+DECLARATIVE_EXAMPLE_MAIN(canvas/canvas)