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

Time for action – Exposing items as properties

Children of a component are not available from outside of it by default. This means that Calculator.qml cannot access input fields or radio buttons of our form. To implement the logic of the calculator, we need to access these objects, so let's expose them as public properties. Select the argument1 text field in the Navigator and click on the  Toggles whether this item is exported as an alias property of the root item button to the right of the object ID. After you click on the button, its icon will change to indicate that the item is exported. Now we can use the argument1 public property in

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