diff options
-rw-r--r-- | examples/declarative/dial/dial.pro | 9 | ||||
-rw-r--r-- | examples/declarative/dial/dial.qrc | 10 | ||||
-rw-r--r-- | examples/declarative/dial/main.cpp | 18 |
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(); +} + + |