I fixed this with JavaScript, probably not this best way but it works for me...
TimleineVertical.qml:
@
Row {
id: deviceRow
spacing: 20
Repeater {
id: deviceRepeater
model: attributes
Button {id: deviceImageButton;
anchors.verticalCenter: parent.verticalCenter;
iconSource: deviceImage;
width: 100;
height: 100;
onClicked: setVisibleDetail(detailRectangle, deviceItem), setTest(euro, kwh, time, euroText, kwhText, timeText)
style: TimelineDeviceButtonStyle{} }
}
@
JavaScript to set the values from the model for the text element:
@
function setTest(euro, kwh, time, euroText, kwhText, timeText) {
euroText.text = euro;
kwhText.text = kwh;
timeText.text = time;
}
@
Text element:
@
Text {
id: euroText
anchors.top: parent.top
anchors.topMargin: 30
anchors.left: parent.left
anchors.leftMargin: 20
font.pixelSize: 12
}
@