Priority: P2: Important
Affects Version/s: 5.12
In the following example, a delegate model uses a QQmlListProperty as a source model. The DelegateModel is used by a ListView. In this case, a change in the QQmlListProperty leads to a Segmentation Fault during the call of the the following line:
The error does not occur when list view does not use the delegate model or if the DelegateModel does not use the underlying QQmlListProperty.
Also, by avoiding the DelegateModel all together and having the ListView accessing the QQmlListProperty model directly, also does not crash.
Down here there is the QML part of the example, in the attached ZIP file, you can find the whole project and additionally the backtrace caused by the Segmentation Fault.
The QQmlListProperty model of RandomObjectsProvider contains a very simple elements of a QObjects derivative with random content.
The changes in the model are caused by the objectsProvider.createNewElements() call. This method is triggered every 300ms
|For Gerrit Dashboard: QTBUG-73733|
|253193,3||DelegateModel: Zero foreign context objects when they are deleted||5.12||qt/qtdeclarative||Status: MERGED||+2||0|