Settings.qml
Column {
anchors {
fill: parent
top: aboutPage.bottom
topMargin: units.gu(6)
}
ListItem {
ListItemLayout {
TextField { id: searchLocation; placeholderText: "hellooooo" }
Button { text: "enter"
onClicked: requestWeaCity() }
}
}
Repeater {
model: ListModel {
id: locationModel
property int selectedIndex: -1
}
ListItem {
ListItemLayout {
title.text: model.name + " " + model.weather
}
onClicked: {
print("user clicked on", model.id, model.name, model.weather)
locationModel.selectedIndex = index
}
}
}
}