Re: [Interest] Managing memory with QObject*-models exposed to QML

2016-07-17 Thread Stephen Kelly
Ola Røer Thorsen wrote: > My worry here is that deleteLater() is sometimes still too soon for the > QML engine to keep up, especially when there is a lot of things going on > in the Quick scene. Or if there is an animation for item removal. > Could this be the case? If so, what is the

Re: [Interest] Managing memory with QObject*-models exposed to QML

2016-07-17 Thread Ben Lau
On 17 July 2016 at 19:22, Ola Røer Thorsen wrote: > Thank you for the feedback, Ben. > > 2016-07-15 19:32 GMT+02:00 Ben Lau : > >> Hi, >> >> In my humble opinion, QObjectListModel is a bad idea. Because it is >> difficult to manage the life cycle of

Re: [Interest] Managing memory with QObject*-models exposed to QML

2016-07-17 Thread Ola Røer Thorsen
Thank you for the feedback, Ben. 2016-07-15 19:32 GMT+02:00 Ben Lau : > Hi, > > In my humble opinion, QObjectListModel is a bad idea. Because it is > difficult to manage the life cycle of QObject with QML. Just like your > problem. I have met the similar issue in my first QML

Re: [Interest] Managing memory with QObject*-models exposed to QML

2016-07-15 Thread Ben Lau
Hi, In my humble opinion, QObjectListModel is a bad idea. Because it is difficult to manage the life cycle of QObject with QML. Just like your problem. I have met the similar issue in my first QML project. The application always crashes. The pattern is purely random. I wasted a lot of time to

[Interest] Managing memory with QObject*-models exposed to QML

2016-07-14 Thread Ola Røer Thorsen
I've found that creating C++ models containing a list of QObject* based on QAbstractListModels and using them in Quick views such as ListView is very useful. I'm not the only one, there are several implementations of "QObjectListModel" around, and I've got my own as well. On quite rare ocations I