Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.1
-
None
-
db9be0a9d6195bc52415ce28d605ace149d02782
Description
In Qt 5.4, and Qt 5.5, the behavior of this is different:
import QtQuick 2.3 Rectangle { id: root width: 100 height: 40 Component.onCompleted: { var result = root.mapToItem(null, 2, 2, 4, 4); result.left = result.x result.right = result.x + result.width console.log(result, JSON.stringify(result)); console.log(result.left, result.right) } }
Qt 5.4:
qml: [object Object] {"x":2,"y":2,"width":4,"height":4,"left":2,"right":6} qml: 2 6
Qt 5.5:
qml: QRectF(2, 2, 4, 4) {} qml: undefined undefined