Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.5, 6.3.1, 6.3, 6.4.0 Beta1, 6.2
-
6.2.3, 6.3.0 Beta3
-
aa4e5d5982 (qt/qtdeclarative/dev) ab22b8bbd3 (qt/qtdeclarative/6.2) ab22b8bbd3 (qt/tqtc-qtdeclarative/6.2) 63712d9f9d (qt/qtdeclarative/6.3)
Description
The issue title may be a bit confusing. It's simpler to show on a minimal example.
import QtQuick 2.0 Item { width: 400 height: 400 Rectangle { color: "yellow" implicitWidth: 50 implicitHeight: 50 height: { return 0 } Behavior on height { NumberAnimation { duration: 300 } } } }
There's implicitHeight set for the Rectangle. Also height is set to be zero via a binding. The expected height of the item in this case is 0. But if there's a Behavior on height, the initial value from the binding is not applied and the resulting height is 50.
In Qt 5 the issue does not exist, and the resulting item height is 0.
Some details:
- It does not matter what the binding returns. It may be 0, it may be 12345. Any value is ignored.
- The binding is not killed by something. If its value could be changed, the Behavior will animate the height. For example I can declare a property, bind height to its value, and later change the property. The Behavior will play the animation.