Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.5, 6.2, 6.3.1, 6.3, 6.4.0 Beta1
-
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.
Attachments
For Gerrit Dashboard: QTBUG-101771 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
401157,1 | WIP: Allow noop bindings | dev | qt/qtbase | Status: ABANDONED | -2 | 0 |
401158,4 | QQuickBehavior: Force notify when first setting the binding | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
401560,3 | QProperty: Allow manual scheduling of binding notification | dev | qt/qtbase | Status: MERGED | +2 | 0 |
401754,2 | QProperty: Allow manual scheduling of binding notification | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
401755,2 | QProperty: Allow manual scheduling of binding notification | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
402261,2 | QQuickBehavior: Force notify when first setting the binding | 6.3 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
402262,2 | QQuickBehavior: Force notify when first setting the binding | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |