diff options
Diffstat (limited to 'examples/qml/tutorials/extending/chapter2-methods')
3 files changed, 16 insertions, 1 deletions
diff --git a/examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.pro b/examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.pro index 8ed66f8b66..a451c775cf 100644 --- a/examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.pro +++ b/examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.pro @@ -3,3 +3,13 @@ QT += qml quick HEADERS += piechart.h SOURCES += piechart.cpp \ main.cpp + +RESOURCES += chapter2-methods.qrc + +DESTPATH = $$[QT_INSTALL_EXAMPLES]/qml/tutorials/extending/chapter2-methods +target.path = $$DESTPATH + +qml.files = *.qml +qml.path = $$DESTPATH + +INSTALLS += target qml diff --git a/examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.qrc b/examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.qrc new file mode 100644 index 0000000000..f1168aef3b --- /dev/null +++ b/examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/"> + <file>app.qml</file> + </qresource> +</RCC> diff --git a/examples/qml/tutorials/extending/chapter2-methods/main.cpp b/examples/qml/tutorials/extending/chapter2-methods/main.cpp index d30628fd5a..4e719d2722 100644 --- a/examples/qml/tutorials/extending/chapter2-methods/main.cpp +++ b/examples/qml/tutorials/extending/chapter2-methods/main.cpp @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); - view.setSource(QUrl::fromLocalFile("app.qml")); + view.setSource(QUrl("qrc:///app.qml")); view.show(); return app.exec(); } |