April 2018
Beginner
714 pages
18h 21m
English
So far, we have been working on a single button. Adding another button by copying the code, changing the identifiers of all components, and setting different bindings to properties is a very tedious task. Instead, we can make our button item a real component, that is, a new QML type that can be instantiated on demand as many times as required.
First, position the text cursor in the beginning of our Rectangle item and press Alt + Enter on the keyboard to open the refactoring menu, like in the following screenshot:

From the menu, choose Move Component into Separate File. In the popup, ...
Read now
Unlock full access