summaryrefslogtreecommitdiffstats
path: root/examples/declarative/spinner/main.qml
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-05-13 05:07:21 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-05-13 05:07:21 (GMT)
commitae8e4afcadc9ff084e1d1859c29fbc8b629e3392 (patch)
tree675801312aa5740bc68f67444cb5754dd9e5abe1 /examples/declarative/spinner/main.qml
parenta19df56265e59bb26f927638aa5c75ccd666c388 (diff)
downloadQt-ae8e4afcadc9ff084e1d1859c29fbc8b629e3392.zip
Qt-ae8e4afcadc9ff084e1d1859c29fbc8b629e3392.tar.gz
Qt-ae8e4afcadc9ff084e1d1859c29fbc8b629e3392.tar.bz2
Add an example spinner.
Also add missing increment/decrementCurrentIndex() slots to PathView, and tweak the number of points cached along a Path.
Diffstat (limited to 'examples/declarative/spinner/main.qml')
-rw-r--r--examples/declarative/spinner/main.qml18
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/declarative/spinner/main.qml b/examples/declarative/spinner/main.qml
new file mode 100644
index 0000000..6be567a
--- /dev/null
+++ b/examples/declarative/spinner/main.qml
@@ -0,0 +1,18 @@
+import Qt 4.7
+import "content"
+
+Rectangle {
+ width: 240; height: 320
+ Column {
+ y: 20; x: 20; spacing: 20
+ Spinner {
+ id: spinner
+ width: 200; height: 240
+ focus: true
+ model: 20
+ itemHeight: 30
+ delegate: Text { font.pixelSize: 25; text: index; height: 30 }
+ }
+ Text { text: "Current item index: " + spinner.currentIndex }
+ }
+}