--- a/src/declarative/util/qdeclarativetimer.cpp Tue Jul 06 15:10:48 2010 +0300
+++ b/src/declarative/util/qdeclarativetimer.cpp Wed Aug 18 10:37:55 2010 +0300
@@ -80,17 +80,22 @@
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
@@ -99,7 +104,7 @@
elapsed time will be reset to 0, and the Timer will be triggered
1000ms later.
- \sa {QtDeclarative}
+ \sa {declarative/toys/clocks}{Clocks example}
*/
QDeclarativeTimer::QDeclarativeTimer(QObject *parent)