beemaneni
29th September 2016, 14:11
Hi,
This is pretty simple but i lost somewhere when i am working on this .Here i post my example.
I need to read a property which is declared inside a delegate from its parent.How do i do ?
ListView{
id: listView
property bool indeeee: listView.contentItem.childrenRect.check
state: listView.indeeee ? "moved" : ""
delegate: delegateItem
}
Component{
id: delegateItem
Row{
id: rowww
spacing: 20
property bool check:index===2 ? true : false
}
}
I tried to read with listView.contentItem.childrenRect.check which says unable to assign undefined to bool
Regards
Bala B
This is pretty simple but i lost somewhere when i am working on this .Here i post my example.
I need to read a property which is declared inside a delegate from its parent.How do i do ?
ListView{
id: listView
property bool indeeee: listView.contentItem.childrenRect.check
state: listView.indeeee ? "moved" : ""
delegate: delegateItem
}
Component{
id: delegateItem
Row{
id: rowww
spacing: 20
property bool check:index===2 ? true : false
}
}
I tried to read with listView.contentItem.childrenRect.check which says unable to assign undefined to bool
Regards
Bala B