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 – Adding states to the form

Open the CalculatorForm.ui.qml file in the form editor. The bottom part of the main area contains the states editor. The base state item is always present on the left. Click on the Add a new state button on the right of the states editor. A new state will appear in the editor. It contains a text field that you can use to set the state's name. Set the name to single_argument.

Only one of the states can be selected at a time. When a custom state is selected, any changes in the form editor will only affect the selected state. When the base state is selected, you can edit the base state and all the changes will affect all other states unless the changed property is overridden in some state.

Select the ...

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