Wrong behavior with State's extend property
-
Hi everyone,
I was playing around with States in QML when I found out a strange behavior.
Considering this case
@State
{
name: "mainState"
when: firstBool}
State
{
name: "subStateOfMain"
when: secondBool
extend: "mainState"
}@In my sense we are in :
mainState when and only when :
@firstBool && !secondBool@subStateOfMain when and only when :
@firstBool && secondBool@What really happens with Qt is that it does a OR instead of a AND for the extender State ( "subStateOfMain" here ). Does anyone else has the same issue or feel that what I described should be the actual behavior ?
-
Hi,
It's not going like you described. Of course states are acting as OR.
From documentation :"When a state extends another state, it inherits all the changes of that state."
example can be find here: http://jingfenghanmax.blogspot.fi/2010/08/extend-property-of-qml-state.html