Creating a complex List Model in QML
-
I am using a
ListViewto display data. For that I useComponentas a delegate andListModelas the model to create rows in theListView:Below image is the use case for the design:
I use a
functionto create the model based on the data received from the C++. But since rows and columns are dynamic and also each small box as acheckboxto 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.
