diff options
Diffstat (limited to 'doc/src/snippets/declarative/qtbinding/stopwatch/main.qml')
-rw-r--r-- | doc/src/snippets/declarative/qtbinding/stopwatch/main.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml new file mode 100644 index 0000000..2efa542 --- /dev/null +++ b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml @@ -0,0 +1,18 @@ +//![0] +import Qt 4.7 + +Rectangle { + width: 300 + height: 300 + + MouseArea { + anchors.fill: parent + onClicked: { + if (stopwatch.isRunning()) + stopwatch.stop() + else + stopwatch.start(); + } + } +} +//![0] |