-
Bug
-
Resolution: Won't Do
-
P1: Critical
-
None
-
6.8
-
None
A column is supposed to populate two data roles:
TableModelColumn { display: "index"; edit: "assignees" }
Rows are populated by QJSValues:
rows: [
{
index: 0,
assignees: [ { value: "Volker"}, { value: "Matthias"} ]
},
{
index: 1,
assignees: [ { value: "Paul"}, { value: "Eddy"} ]
}
]
Metadata is added correctly:
qt.qml.tablemodel: - column 0: qt.qml.tablemodel: - added metadata for built-in role "display" at column index 4: name="index" typeName="int" type=2 qt.qml.tablemodel: - added metadata for built-in role "edit" at column index 4: name="assignees" typeName="QVariantList" type=9
...but data can't be accessed in a delegate:
DelegateChoice {
column: 0
delegate: ComboBox {
id: comboBox
model: model.edit
currentIndex: model.display
}
}
...error message:
Main.qml:142: TypeError: Cannot read property 'display' of undefined Main.qml:141: TypeError: Cannot read property 'edit' of undefined
It works seemlessly, if only one data role is populated.