function setRandomText()
{
for (var i = 0; i < comboBoxRect.children.length; ++i)
{
comboBoxRect.children[i].itemText = 100 * Math.random("fff")
}
}
Rectangle {
id: comboBoxRect
anchors.fill: parent
color: "lightblue"
radius: 5
Column {
Repeater {
model: 3
ComboBoxListItem {
itemText: 100 * Math.random()//"this is the " + index + " string"
}
}
}
}
Он не работает... (( Т.к. itemText внутри функции не определен... Если кто знает, подскажите пожалуйста как нужно добираться из setRandomText до itemText у ComboBoxListItem?
Спасибо!