Hi,
I need to access a model from another qml component. My model holds four strings:
- deviceImage – euro – kwh – time
//...
Row {
id: deviceRow
spacing: 20
Repeater {
id: deviceRepeater
model: *timeslotmodel*
Button {id: deviceImageButton; anchors.verticalCenter: parent.verticalCenter; iconSource: *deviceImage*; width: 100; height: 100; }
}
}
}
}
}
TimelineDeviceDetail {}
//...
And I need to access “euro, kwh, time” in TimelineDeviceDetail:
//...
Text {
id: euroText
*text: euro*
anchors.top: parent.top
anchors.topMargin: 20
anchors.left: parent.left
anchors.leftMargin: 20
font.pixelSize: 12
}
Text {
id: kwhText
*text: kwh*
anchors.top: parent.top
anchors.topMargin: 20
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 12
}
Text {
id: timeText
*text: time*
anchors.top: parent.top
anchors.topMargin: 20
anchors.right: parent.right
anchors.rightMargin: 20
font.pixelSize: 12
}
//...
How can I do this? How can I delegate them to TimelineDeviceDetail?
Thanks
↧