Game Programming using Qt 5 Beginner's Guide - Second Edition
by Pavel Strakhov, Witold Wysota, Lorenz Haas
What just happened?
The code we just created introduces a couple of new features. Let's go through them one by one.
First of all, we used a new element called Repeater. It does exactly what its name says—it repeats items declared within it using a given model. For each entry in the model, it creates an instance of a component assigned to a property called delegate (the property name means that it contains an entity to which the caller delegates some responsibility, such as describing a component to be used as a stencil by the caller). Item declared in Repeater describes the delegate even though we cannot see it explicitly assigned to a property. This is because delegate is a default property of the Repeater type, which means anything unassigned ...
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