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") } }