Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.6.0
-
None
-
Windows 8.1 64 bit
Description
Application crash when destroying of the layout that has children attatched to default property.
To crash click the red button.
It may be related to: QTBUG-52490 and QTBUG-52241
Main.qml
import QtQuick 2.5 Rectangle { id: root ListView { id: listView anchors.fill: parent model: 5 spacing: 2 delegate: TestItem { width: listView.width height: 10 Rectangle { width: 10 height: 10 color: "black" } } } Rectangle { anchors.bottom: parent.bottom color: "red" width: 20 height: 20 MouseArea { anchors.fill: parent onClicked: { listView.model = Math.floor((Math.random() * 10) + 1) } } } }
TestItem.qml
import QtQuick 2.5 import QtQuick.Layouts 1.3 Item { id: root default property alias rowData: row.data RowLayout { //if it is changed from RowLayout to Item, all works correctly id: row anchors.fill: parent //Component.onDestruction: data = [] //this hack can solve the problem } }
Attachments
Issue Links
- duplicates
-
QTBUG-51927 [REG:5.6.0-alpha1->5.6.0] adding items to GridLayout with default property alias causes a crash during destruction
- Closed