I have already told in the article about the
creation of dynamic widgets to Qt
, how to create and delete buttons dynamically, as well as how to interact with them. And there used Vertical Layout, a case we can use QML ListView Qml, both similarly used when programming in Java for Android. That, incidentally, is also applicable when programming in Qt for Android.
The article about the dynamic creation of widgets used for example QButton class objects. This article will use the objects Button Qml, which customization was discussed in the
. But the key will be placed in the ListView Qml.
Project structure for ListView Qml
This time dispense project created by default and even without the designer interface. Especially because at the time of this writing, not all parameters can be set in the designer. A following project structure:
- the profile of the project;
- deploy rules file on the target platform;
- the main application startup file;
- qml file with the original program codes