[Qt-qml] property "alias" on run-time
Pekka.E.Jokela at nokia.com
Pekka.E.Jokela at nokia.com
Thu Sep 2 07:16:22 CEST 2010
Hi,
I have a two properties
property var A
property var B
and I'd like to have them equal when condition C is met i.e. two way binding i.e. as "property alias B: A"
So, when C is met:
-changing A changes B to be equal to A
-changing B changes A to be equal to B
When C is not met, the A and B can be changed independently without changing each other.
I tried something like:
states: [
State {
name: "C met"
when: C == true
PropertyChanges { A: B }
PropertyChanges { B: A }
}
]
But I think the latter one cancels the first one to avoid infinite loops.
Any pointers?
Thanks,
-Pekka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100902/f9334d7f/attachment.html
More information about the Qt-qml
mailing list