From 75da89f26a89ac1224372277799051f9224dbbe7 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 8 Oct 2009 12:43:29 +1000 Subject: Allow dial to be built as an exe. --- examples/declarative/dial/dial.pro | 9 +++++++++ examples/declarative/dial/dial.qrc | 10 ++++++++++ examples/declarative/dial/main.cpp | 18 ++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 examples/declarative/dial/dial.pro create mode 100644 examples/declarative/dial/dial.qrc create mode 100644 examples/declarative/dial/main.cpp diff --git a/examples/declarative/dial/dial.pro b/examples/declarative/dial/dial.pro new file mode 100644 index 0000000..1d1f811 --- /dev/null +++ b/examples/declarative/dial/dial.pro @@ -0,0 +1,9 @@ +SOURCES = main.cpp +RESOURCES = dial.qrc + +QT += script declarative + +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/dial +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dial.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/dial +INSTALLS += target sources diff --git a/examples/declarative/dial/dial.qrc b/examples/declarative/dial/dial.qrc new file mode 100644 index 0000000..77354c0 --- /dev/null +++ b/examples/declarative/dial/dial.qrc @@ -0,0 +1,10 @@ + + + DialLibrary/background.png + DialLibrary/overlay.png + DialLibrary/needle_shadow.png + DialLibrary/needle.png + DialLibrary/Dial.qml + dial.qml + + diff --git a/examples/declarative/dial/main.cpp b/examples/declarative/dial/main.cpp new file mode 100644 index 0000000..b65c9ff --- /dev/null +++ b/examples/declarative/dial/main.cpp @@ -0,0 +1,18 @@ +#include +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + QmlView *canvas = new QmlView; + canvas->setUrl(QUrl("qrc:/dial.qml")); + canvas->execute(); + canvas->resize(210,240); + canvas->show(); + + return app.exec(); +} + + -- cgit v0.12