Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
QDS 4.7.2
Description
See the attached project.
Expected outcomes
Actual outcomes
The generated code contains Layout.preferredWidth: 31 which is wrong.
Rectangle { id: notification width: 200 height: 40 color: "#00ccff" property alias labelText: label.text RowLayout { ... spacing: 10 Item { ... Layout.fillWidth: true } Rectangle { id: icon color: "#0000cc" Layout.preferredWidth: 20 Layout.preferredHeight: 20 Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter } Text { id: label ... text: qsTr("Label") horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignTop Layout.preferredWidth: 31 Layout.preferredHeight: 14 Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter } Item { ... Layout.fillWidth: true } } }
Other observations
Even if we don't use auto-layouts and instead specify auto width for the text (see https://help.figma.com/hc/en-us/articles/27378154668951-Adjust-text-dimensions-and-resizing#h_01JB9SGE9C9982902T505EK7ZQ ), Qt Bridge (Importer) still generates width: 31. This is wrong.