-
Bug
-
Resolution: Incomplete
-
P2: Important
-
6.4.2
-
None
In the following code, I have contrived a situation where the height of a Rectangle is Infinite before becoming a valid value.
import QtQuick import QtQuick.Window Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Rectangle { property real divisor: 0 width: parent.width height: parent.height / divisor color: "green" Timer { running: true interval: 1000 onTriggered: parent.divisor = 1 } } }
While the height is Infinite, the Rectangle does not render, which is fine as the height is not valid. However once the height becomes a valid value, the Rectangle still fails to render.
This situation can (and did) happen in a real and valid scenario where items were scaled by a factor that involved division by a constant, and the chance order in which elements were initialised by the QML engine resulted in the binding being setup and evaluated before the constant received its value.
Can this be 'corrected' so that QML items can tolerate temporarily invalid dimensions (e.g. Infinite, NaN, negative x, y, width, height)?
- relates to
-
QTBUG-114467 qmllint does not warn about unqualified id lookup
-
- Closed
-