Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

how to replace setInterval

$
0
0
Here is the same sample that uses a function instead: Rectangle {     width: 200     height: 50       Timer {         interval: 1000         running: true         repeat: true         onTriggered: setTime()     }       Text {         id: clock         anchors.centerIn: parent     }       function setTime() {         clock.text = Qt.formatTime(new Date())     } }

Viewing all articles
Browse latest Browse all 4972

Trending Articles