This is my first QT question - I'm generally a C # programmer, so forgive me for asking a stupid question for which I am sure there is a very simple answer that I just cannot find:
I want to add items to the list, for now let them say that these are strings. I have a QListView: UI->listView , QStringList and QStringListModel:
stringList = new QStringList(); stringList->append("ABC"); stringList->append("123"); listModel = new QStringListModel(*stringList, NULL); ui->listView->setModel(listModel); stringList->append("xyz");
In this example, "ABC" and "123" in my list are compiled and deleted, but not "xyz". Why not? Do I need to redraw a ListView somehow? Did I do something wrong with NULL?
Thanks.
source share