Game Programming using Qt 5 Beginner's Guide - Second Edition
by Pavel Strakhov, Witold Wysota, Lorenz Haas
What just happened?
By setting the interval property, we ask the timer to emit the triggered signal every 500 ms, causing our currentDate property to be updated with a new Date object representing the current time. The clock is also given the running property (pointing to its equivalent in the timer) that can control whether updates should be enabled. The timer's repeat property is set to true; otherwise, it will trigger just once.
To briefly sum up what you have learned so far, we can say that you know how to create hierarchies of objects by declaring their instances, and you also know how to program new types in separate files, making definitions available as components to be instantiated in other QML files. You can even use the Repeater ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access