[Qt-interest] QML list view crashes after adding 256 child elements

Yuvraaj Kelkar yuvraaj at gmail.com
Thu Dec 16 18:03:26 CET 2010


I have a QML list view for a list of contacts.
Each contact delegate has a child list view with that contact's phone numbers.
Both list views pick up data from models in my C++ application.

When I scroll down to the element which loads the 257th inner list
view, the application crashes after dumping the following messages:
===
QDeclarativeComponent: Cannot create new component instance before
completing the previous
<Unknown File>: QML VisualDataModel: Error creating delgate
===
(yes "delgate")

My source locations are as follows:
QML:
The outer list view is here:
http://code.google.com/p/qgvdial/source/browse/trunk/qml/ContactsList.qml
The inner list view is here:
http://code.google.com/p/qgvdial/source/browse/trunk/qml/ContactDetails.qml

Data models:
Outer data model:
http://code.google.com/p/qgvdial/source/browse/trunk/src/ContactDetailsModel.h
and http://code.google.com/p/qgvdial/source/browse/trunk/src/ContactsModel.cpp
Inner data model:
http://code.google.com/p/qgvdial/source/browse/trunk/src/ContactDetailsModel.h
and http://code.google.com/p/qgvdial/source/browse/trunk/src/ContactDetailsModel.cpp

I have tried debugging and google, and I am stumped.
Any ideas what I'm doing wrong? Or is this a QML bug?



More information about the Qt-interest-old mailing list