summaryrefslogtreecommitdiffstats
path: root/examples/declarative/dial
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-10-08 02:43:29 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-10-08 02:43:29 (GMT)
commit75da89f26a89ac1224372277799051f9224dbbe7 (patch)
treebf8692ec637b8ee6d848ad480ad3d86017193f1a /examples/declarative/dial
parent2fadeec39eec188136d027cfbc4c0872669db92f (diff)
downloadQt-75da89f26a89ac1224372277799051f9224dbbe7.zip
Qt-75da89f26a89ac1224372277799051f9224dbbe7.tar.gz
Qt-75da89f26a89ac1224372277799051f9224dbbe7.tar.bz2
Allow dial to be built as an exe.
Diffstat (limited to 'examples/declarative/dial')
-rw-r--r--examples/declarative/dial/dial.pro9
-rw-r--r--examples/declarative/dial/dial.qrc10
-rw-r--r--examples/declarative/dial/main.cpp18
3 files changed, 37 insertions, 0 deletions
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 @@
+<RCC>
+ <qresource prefix="/">
+ <file>DialLibrary/background.png</file>
+ <file>DialLibrary/overlay.png</file>
+ <file>DialLibrary/needle_shadow.png</file>
+ <file>DialLibrary/needle.png</file>
+ <file>DialLibrary/Dial.qml</file>
+ <file>dial.qml</file>
+ </qresource>
+</RCC>
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 <QApplication>
+#include <QUrl>
+#include <qmlview.h>
+
+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();
+}
+
+