Creating a complex List Model in QML
Unsolved
QML and Qt Quick
-
I am using a
ListView
to display data. For that I useComponent
as a delegate andListModel
as the model to create rows in theListView
:Below image is the use case for the design:
I use a
function
to create the model based on the data received from the C++. But since rows and columns are dynamic and also each small box as acheckbox
to display I am not getting how to populate/create a model for this.ListModel{ id:myListModel } function createModel(){ for(var rows = 0 ; rows < 10; rows++) { ListModel.append({}) //How to add data to model like a group based on the row and col ? } }
As each small rectangle as checkboxes and columns are dynamic how to append data to the
ListModel
?Please Suggest.