diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-06-01 06:27:59 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-06-02 00:07:33 (GMT) |
commit | 9cb0802cede5f9fd91ca303bcec5ae869acae951 (patch) | |
tree | f90d5fed5004dfa7e526783d81f94f04444313e4 /src/declarative/util/qdeclarativetimer.cpp | |
parent | 2e904930ede28a59710ef6f898419aba7ede7c06 (diff) | |
download | Qt-9cb0802cede5f9fd91ca303bcec5ae869acae951.zip Qt-9cb0802cede5f9fd91ca303bcec5ae869acae951.tar.gz Qt-9cb0802cede5f9fd91ca303bcec5ae869acae951.tar.bz2 |
Doc fixes and improvements - fix some example code, link to
examples from class docs and improve assorted docs
Diffstat (limited to 'src/declarative/util/qdeclarativetimer.cpp')
-rw-r--r-- | src/declarative/util/qdeclarativetimer.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/declarative/util/qdeclarativetimer.cpp b/src/declarative/util/qdeclarativetimer.cpp index 53a9d83..9e18eb5 100644 --- a/src/declarative/util/qdeclarativetimer.cpp +++ b/src/declarative/util/qdeclarativetimer.cpp @@ -80,17 +80,22 @@ public: the text every 500 milliseconds: \qml - Timer { - interval: 500; running: true; repeat: true - onTriggered: time.text = Date().toString() - } - Text { - id: time + import Qt 4.7 + + Item { + Timer { + interval: 500; running: true; repeat: true + onTriggered: time.text = Date().toString() + } + + Text { + id: time + } } \endqml - QDeclarativeTimer is synchronized with the animation timer. Since the animation - timer is usually set to 60fps, the resolution of QDeclarativeTimer will be + The Timer element is synchronized with the animation timer. Since the animation + timer is usually set to 60fps, the resolution of Timer will be at best 16ms. If the Timer is running and one of its properties is changed, the @@ -98,8 +103,6 @@ public: 1000ms has its \e repeat property changed 500ms after starting, the elapsed time will be reset to 0, and the Timer will be triggered 1000ms later. - - \sa {QtDeclarative} */ QDeclarativeTimer::QDeclarativeTimer(QObject *parent) |