I'm trying to implement a model/view architecture in my program but the view isn't updated after changing the model, though I think it automatically should be.
Here's a simplified version of my code:
QStringListModel *model = new QStringListModel;
QListView *view = new QListView;
view->setModel(model);
QStringList list;
list << "a" << "b" << "c";
model->setStringList(list);
model->stringList() << "d";
Problem is, my view only contains a, b and c. But not d. Why? I thought the view would automatically be updated after changing the model, but it doesn't seem to be the case. Dou you have an idea?