我可以恢复模型中的元素:
property var model: [
{ title: i18n.tr("Standard"), descr: i18n.tr("Style by default"), style:"default" },
{ title: i18n.tr("None"), descr: i18n.tr("Icons without style", style:"none" }
]
ListItem.ItemSelector {
id: styleIconList
model: settingsColumn.model
delegate: OptionSelectorDelegate {
property var item: model.modelData ? model.modelData : model
text: item.title
subText: item.descr
}
onSelectedIndexChanged: {
launchermodular.settings.iconStyle = model.get(selectedIndex).style //here is problem
}
}
你能告诉我如何吗?
谢谢