Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt for MCUs 1.4
-
None
-
-
0
-
UL Sprint 3.7
Description
AnchorChanges do not work with QML for MCU
Following QML code:
Rectangle {
id: test
width: 480
height: 272
states: [
State {
name: "Test1"
AnchorChanges{
target: test
anchors.horizontalCenter: parentRect.horizontalCenter
}
}
]
Rectangle{
id: parentRect
}
}
created following c++ corrupted c++ code:
. . . int Test::_x_anchor_bindingFunctor::operator()(Test *self) const { return self->anchors.horizontalCenter.value().valueFor(&self->) - ((self->width.value())/2); }; . . . void Test::activateState_Test1(Qul::Private::Items::Transition *transition, Qul::Private::Items::Transition::TransitionStatus _qul_transitionStatus) { if (_qul_transitionStatus == Qul::Private::Items::Transition::TransitionStart) { _anchors_horizontalCenter_binding_state_Test1.init<Test, &Test::_anchors_horizontalCenter_binding_state_Test1>(); } // anchors.horizontalCenter: parentRect.horizontalCenter // line 13 "Test/Test.qml" if (!transition || !transition->interceptBinding(_qul_transitionStatus, &.anchors.horizontalCenter, &_anchors_horizontalCenter_binding_state_Test1)) .anchors.horizontalCenter.setBinding(&_anchors_horizontalCenter_binding_state_Test1); if (transition && _qul_transitionStatus == Qul::Private::Items::Transition::TransitionStart) transition->start(&finishActivateState_Test1); }
This issue happens with all anchor types in AnchorChanges