Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.0
-
e67b6c3ab9b3fe32dbc248b7349247a329736d66 (qt/qtdeclarative/dev) 2fd54b5bef7dd2c8dd21ab7d2ff66145df1e4fa2 (qt/qtdeclarative/6.2)
Description
The expected behaviour of the code below is that setting a property with a RESET property attribute calls the reset function for that property. The reset function is being called, yet something has broken here. In the case of width and height, that should result in them being set to the relevant implicit size properties (the bindings for which look like this for Button, for example). This works in 6.1.1 but broke in 6.2.0.
import QtQuick 2.0 import QtQuick.Controls 2.0 ApplicationWindow { x: 800 y: 400 width: 400 height: 400 visible: true QtObject { id: theme property var toolButtonWidth: undefined property var toolButtonHeight: undefined } Button { id: root text: "Button" // Doesn't work with >= 6.0 width: theme.toolButtonWidth height: theme.toolButtonHeight // Works // width: undefined // height: undefined anchors.centerIn: parent onClicked: print("clicked") } }
Attachments
For Gerrit Dashboard: QTBUG-94703 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
357283,4 | QQuickItemPrivate: Make {width,height}Valid a function | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
357284,4 | QQuickItem::{width,height}Valid: correctly handle binding being undefined | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
357285,6 | Adjust to QQuickItemPrivate::{width,height}Valid becoming a function | dev | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |
357414,2 | QQuickItemPrivate: Make {width,height}Valid a function | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
357415,2 | QQuickItem::{width,height}Valid: correctly handle binding being undefined | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
358605,3 | Adjust to QQuickItemPrivate::{width,height}Valid becoming a function | 6.2 | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |