O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required