Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.1.1, 5.2.0 Beta1
Description
The code snippets listed below.
import QtQuick 2.1 import QtQuick.Controls 1.0 Column { width: 480 height: 360 Component { id: column TableViewColumn { } } Instantiator { model: 2 TableViewColumn { title: index } onObjectAdded: table.insertColumn(index, object) onObjectRemoved: table.removeColumn(index, object) } TableView { id: table model: 100 width: parent.width height: parent.height - row.height } Row { id: row Button { text: "Add" onClicked: table.addColumn(column.createObject(table, {title: table.columnCount})) } Button { text: "Remove" enabled: table.columnCount > 0 onClicked: table.removeColumn(table.columnCount-1) } } }
It gives error when we remove an existing column from the instantiator.
Error: Invalid attempt to destroy() an indestructible object
Attachments
Issue Links
- relates to
-
QTBUG-83061 QML Repeater should allow creation of objects
- Closed
-
QTBUG-106011 Cannot use Loader to load a closed Window
- Reported
-
QTBUG-95895 REG 5.15 -> 6.2: destroy() does not destroy objects after appending listModel.
- Closed
-
QTBUG-96167 Ownership of C++ owned object flips when added to ListModel
- Closed