On Wed, Jan 26, 2011 at 5:57 PM, <[email protected]> wrote:
> One of my state definitions triggers this error
> <Unknown File>: QML StateGroup: Can't apply a state change as part of a state
> definition.
> and I can't quite work out why.
>
> Is it the case that no part of the state definition (like a PropertyChange)
> may have *any*
> effect (direct or indirect) on a property that is part of a "when" expression
> determining
> what the current state is?
This happens when you try to set a state in an element that is already
changing its state.
For example:
MouseArea {
id: area
width: 100
height: 100
states: State {
when: area.pressed
PropertyChanges { target: area; state: ""; }
}
}
Probably in your case a state triggered other states and while these
states are being changed another state in the chain is trying to
change one of them.
Br,
Adriano
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml