[SOLVED]Animate control's moving caused by other control's invisibility
-
Hi folks!
I'd like to know is there a method to achieve smooth animation with the code below:
@import QtQuick 1.0Rectangle {
id: containerwidth: 90 height: 90 Column{ Rectangle{ id: redRect width: container.width height: container.height/3 color: "red" MouseArea{ anchors.fill: parent onClicked: container.state = "" } } Rectangle{ id: yellowRect width: redRect.width height: redRect.height color: "yellow" MouseArea{ anchors.fill: parent onClicked: container.state = "new" } } Rectangle{ id: greenRect width: redRect.width height: redRect.height color: "green" } } states: State{ name: "new" PropertyChanges { target: yellowRect visible: false } }
}@
So, I want that green rect smoothly moves upward\downward. How can I achieve that with the code above?
I know that I can extract all of them from the Column and add custom PropertyChange for the green rect (x,y) position to have the smooth animation but maybe there is a method to do it with the Column element?