Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
QDS 4.7.1
-
Windows 10 22H2, Figma 125.3.6
-
bafa8cedf (qds/dev), 5f4505da7 (qds/4.7)
Description
In Figma, the sibling that is higher in the list has a higher Z-order. In QML, the opposite is true (although this relies on an implementation detail).
Normally, when importing a Figma project into QML, the item order is reversed to capture the correct Z-order. However, this is not done with non-default Variants.
The attached project has 2 variants that contain differently-named elements. When converted to QML, the elements in the Alt variant have the wrong Z-order.
Figma
Qt Design Studio
In the code below, `magenta` should come before `black`:
import QtQuick import QtQuick.Controls Rectangle { id: shinyThing state: "pattern_Default" // ... Rectangle { id: cyan // ... } Rectangle { id: yellow // ... } Rectangle { id: black // ... } Rectangle { id: magenta // ... } states: [ State { name: "pattern_Alt" PropertyChanges { target: cyan visible: false } PropertyChanges { target: black visible: true } PropertyChanges { target: magenta visible: true } PropertyChanges { target: yellow visible: false } }, State { name: "pattern_Default" PropertyChanges { target: cyan visible: true } PropertyChanges { target: black visible: false } PropertyChanges { target: magenta visible: false } PropertyChanges { target: yellow visible: true } } ] }
Attachments
Issue Links
- relates to
-
QDS-15232 [Figma Bridge] Variants: Changes in Z-order are not captured
-
- Reported
-
For Gerrit Dashboard: QDS-15231 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
642347,9 | AssetImporter: Ensure that the ComponentSet children order is the same as in the design | qds/dev | qt-creator/tqtc-plugin-qtquickdesigner | Status: MERGED | +2 | +1 |
642751,2 | AssetImporter: Ensure that the ComponentSet children order is the same as in the design | qds/4.7 | qt-creator/tqtc-plugin-qtquickdesigner | Status: MERGED | +2 | +1 |