我有一个 OptionSelector,它委托给 OptionSelectorDelegate,并且有一个 ListModel 作为模型。我应该如何访问 ListElements 的“sometext”属性?
OptionSelector {
id: optionSelector
model: listModel
delegate: delegator
}
Component {
id: delegator
OptionSelectorDelegate {
text: name
}
}
ListModel {
id: listModel
ListElement {name: "name"; sometext: "text"}
ListElement {name: "name"; sometext: "more text"}
}