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

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.