Hi
I want to access the delegates property when i click an button. Here is the simple code
ListView{
id: listt
model: 10
clip:true
width: parent.width
spacing: 25
height: 500
anchors{left: parent.left;leftMargin: 50;top: parent.top;topMargin: 50}
delegate: listDelegate
}
Component {
id: listDelegate
Item{
CheckBox{
id: checker
text: "A"
checked:true
}
}
}
Button{
anchors{right: parent.right;rightMargin: 50;top: parent.top;topMargin: 150}
width: 100
height: 50
text: "CLICK"
MouseArea{
anchors.fill: parent
onClicked: {
// Here i want to read or write all 10(model) values.
}
}
}
ListView{
id: listt
model: 10
clip:true
width: parent.width
spacing: 25
height: 500
anchors{left: parent.left;leftMargin: 50;top: parent.top;topMargin: 50}
delegate: listDelegate
}
Component {
id: listDelegate
Item{
CheckBox{
id: checker
text: "A"
checked:true
}
}
}
Button{
anchors{right: parent.right;rightMargin: 50;top: parent.top;topMargin: 150}
width: 100
height: 50
text: "CLICK"
MouseArea{
anchors.fill: parent
onClicked: {
// Here i want to read or write all 10(model) values.
}
}
}
To copy to clipboard, switch view to plain text mode
How do i achieve delegates property when i click an button.How do i take reference for it and access outside for reading and writing?
Please suggest the ways to do.
Regards
Bala Beemaneni
Bookmarks