Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.8.0
-
None
-
Windows 7 - 64 Bit, Qt 4.8.0 for Desktop - MinGW.
-
bec02b3f36b7e266b00bb143c459cacabda69b69
Description
When the function mapFromItem is invoked on a ListView's list item's parent, the application crashes. The same QML code works, when A.mapFromItem(B, x, y) is replaced by B.mapToItem(A, x, y).
Sample code:
Crash.qml
import QtQuick 1.1 Rectangle { id: root ListView { anchors.fill: parent model: 1 delegate: Rectangle { id: rect Component.onCompleted: { rect.parent.mapFromItem(root, 0, 0); // <== CRASH //root.parent.mapToItem(rect, 0, 0); // <== WORKS! } } } }