Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
QDS 4.2
-
a6c3612a3 (master), 16bb05601 (qds/dev)
-
QDS Berlin - 2023 Week 49/50
Description
Using the example Figma project at QDS-7578, the generated code is
import QtQuick import QtQuick.Layouts 1.15 Rectangle { id: frame // ... RowLayout { id: frame_RowLayout anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.bottom: parent.bottom anchors.bottomMargin: 20 anchors.rightMargin: 30 Rectangle { id: green_Box x: 30 y: 20 width: 100 height: 100 color: "#00ff00" Layout.preferredWidth: 100 Layout.preferredHeight: 100 Layout.alignment: Qt.AlignLeft | Qt.AlignTop } // ... } }
This produces qmllint warnings:
Warning: Detected x on an item that is managed by a layout. This is undefined behavior; use Layout.leftMargin or Layout.rightMargin instead. [Quick.layout-positioning] x: 30 ^^ Warning: Detected y on an item that is managed by a layout. This is undefined behavior; use Layout.topMargin or Layout.bottomMargin instead. [Quick.layout-positioning] y: 20 ^^ Warning: Detected width on an item that is managed by a layout. This is undefined behavior; use implicitWidth or Layout.preferredWidth instead. [Quick.layout-positioning] width: 100 ^^^ Warning: Detected height on an item that is managed by a layout. This is undefined behavior; use implictHeight or Layout.preferredHeight instead. [Quick.layout-positioning] height: 100 ^^^
Attachments
Issue Links
- resulted from
-
QDS-7578 Qt Bridge: Support automatic layouts
- Closed
For Gerrit Dashboard: QDS-10552 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
523646,3 | AssetImporter: Remove position & dimension props from layout children | qds/dev | qt-creator/tqtc-plugin-qtquickdesigner | Status: MERGED | +2 | 0 |
523647,2 | Figma: Add qualified QtQuick layout type | master | qt-creator/tqtc-asset-converters | Status: MERGED | +2 | 0 |