Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
5.2.0 RC1
-
None
-
Confirmed on:
Windows 8.1 MSVC 2012
Fedora 19 + GCC 4.8.1
with recent Qt 5.2 snapshots
Description
In the recent snapshots a new regression appeared. I haven't checked exactly when, however the build I did on Nov 08 seems to be OK, while the recent snapshots fail.
Please consider the following QML code:
import QtQuick 2.0 Rectangle { id: topRect width: 100 height: 100 color: "lightgrey" onCalcHeightChanged: { console.debug(">> [topRect] topRect.calcHeight: ", topRect.calcHeight) console.debug("[topRect] topRect.height", topRect.height) console.debug("[topRect] layoutRow.height: ", layoutRow.height) } //If I assign "100 - layoutRow.height" it works //If it is "height - layoutRow.height" it does not work property real calcHeight: height - layoutRow.height Row { id: layoutRow onHeightChanged: { console.debug(">> [layoutRow] topRect.calcHeight: ", topRect.calcHeight) console.debug("[layoutRow] topRect.height", topRect.height) console.debug("[layoutRow] layoutRow.height: ", layoutRow.height) } Rectangle { id: innerRect width: 100 height: 20 color: "purple" } } }
The property calcHeight (bound to "height - layoutRow.height") is not updated when layoutRow.height changes.
The output I receive with Nov 25 snapshot is:
>> [topRect] topRect.calcHeight: 100 [topRect] topRect.height 100 [topRect] layoutRow.height: 0 >> [layoutRow] topRect.calcHeight: 100 [layoutRow] topRect.height 100 [layoutRow] layoutRow.height: 20
while the older builds (eg. Qt 5.1) produce, as should be expected, as follows:
>> [topRect] topRect.calcHeight: 100 [topRect] topRect.height 100 [topRect] layoutRow.height: 0 >> [layoutRow] topRect.calcHeight: 100 [layoutRow] topRect.height 100 [layoutRow] layoutRow.height: 20 >> [topRect] topRect.calcHeight: 80 [topRect] topRect.height 100 [topRect] layoutRow.height: 20