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! } } } }
Attachments
For Gerrit Dashboard: QTBUG-26280 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
29396,1 | Item.mapFromItem() crashes with Items not created by the engine. | 4.8 | qt/qt | Status: MERGED | +2 | 0 |
29467,1 | Item.mapFromItem() crashes with Items not created by the engine. | master | qt/qtquick1 | Status: MERGED | +2 | 0 |