QML, how to make an animation for Layout.fillHeight?

Good day!
Need to animate the folding of a rectangle, all the markings on Layout'Ah.
For example:
Rectangle {
 id: contentWrapper
 Layout.fillWidth: true
 Layout.fillHeight: true

 Behavior on height {
 NumberAnimation { duration: 500; }

 states: [
 State {
 name: "hidded"
 when: label.hide
 PropertyChanges {
 target: contentWrapper
 Layout.fillHeight: false
 height: 0 

So Makar, rolls up smoothly just the content, the space occupied remains unchanged. Back unfolds jerk (logically, because of the Layout.fillHeight) if you change status during the animation, then do not turn around and hardens in place.
Tried puts Layout.preferedHeight: 0 Behavior on Layout.preferedHeight, but then the same jerk with no animation at all (but the space occupied is reduced).

So, how do I make a smooth collapse/expand when you use Layout ?
March 12th 20 at 08:43
0 answer

Find more questions by tags QMLQt