I have the following C ++ model structure:
Manager
↪ Slot
↪ Processor
↪ name
I only pass Managerthe QML link when creating the instance. I need to populate with ComboBoxnames Processor, but I don't know how to populate this nested structure.
Here is the code I plan to have (but it doesn't work now):
ComboBox {
model: Repeater {
model: manager
delegate: Repeater {
model: slot
delegate:Repeater {
model: processor
delegate: ListModel {
ListElement {text: name}
}
}
}
}
}
I know that delegates are intended to indicate how to display data (and why it ComboBoxdoes not have this), but I am not aware of how to implement this correctly.
So my question is: how to fill in a recursively ListModel?
source
share