Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.0
-
None
-
Linux, Kubuntu 9.10, Qt from the 4.7 branch as of 2010-03-18, g++ (Ubuntu 4.4.1-4ubuntu9) 4.4.1
-
55ffc0f27638485803f29d985a57deb5b3db4584
Description
Setting a QList<QObject *> model as the model for a GridView causes a crash when a new model is set. Basic idea is:
QtDeclarative view;
QList<QObject *> model1;
model1 << ....;
view.rootContext()->setContextProperty("modle", QVariant::fromValue( model ) );
No problems here, the model data is used without an problems. Create a new list with data of the same type, but with fewer elements than in model1:
QList<QObject *> model2;
model2 << ....;
view.rootContext()->setContextProperty("modle", QVariant::fromValue( model ) );
This will crash. If model2 contains more elements than model1 it works ok, so the key seems to be that the second model must have less items.