Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.2
-
-
b81e27e652 (qt/qtdeclarative/dev) 5174504fd7 (qt/qtdeclarative/6.3) 33ad379056 (qt/qtdeclarative/6.2)
Description
Example in Qt-6.2.2\quick\draganddrop\tiles seems to be broken. It is working in 5.15.2.
There are two gifs in attachments
6.2.2.gif shows current apparently wrong behavior.
6.2.2 fixed.gif shows correct behavior which is the same as in 5.15.2. To achieve that, I had to make changes to tile's states property in DragTile.qml:
states: [ State { when: mouseArea.drag.active ParentChange { target: tile; parent: root } AnchorChanges { target: tile; anchors.verticalCenter: undefined; anchors.horizontalCenter: undefined } } ,State { when: !mouseArea.drag.active ParentChange { target: tile; parent: mouseArea } AnchorChanges { target: tile; anchors.verticalCenter: mouseArea.verticalCenter; anchors.horizontalCenter: mouseArea.horizontalCenter } } ]
Adding a new state which resets parent and anchors to their original values seems reasonable and makes me wonder how it worked before without that change. The same fix worked for me in our production code when we migrated from Qt 5 to Qt 6.
Is this a Qt bug? If this is not a Qt bug, but an intended behavior change, I haven't found any warnings and migration guidance.
Please, kindly provide a better solution, if any.
Attachments
Issue Links
- duplicates
-
QTBUG-101069 Quick: Drap & Drop reorder on List- or GridView causes random item displacement / render error
- Closed
- relates to
-
QTBUG-98857 [REG 6.2.0->6.2.1] QML: Wrong item position after drag&drop
- Closed
For Gerrit Dashboard: QTBUG-99436 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
388166,3 | Drag and Drop example: remove ParentChange | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
388461,2 | Drag and Drop example: remove ParentChange | 6.3 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
388462,2 | Drag and Drop example: remove ParentChange | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
398267,4 | QQuickStateOperations: updateGeometry() when setting x/y/w/h | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
398458,2 | QQuickStateOperations: updateGeometry() when setting x/y/w/h | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
398463,2 | QQuickStateOperations: updateGeometry() when setting x/y/w/h | 6.3 | qt/qtdeclarative | Status: MERGED | +2 | 0 |