Show Last element in QListView
问题 It sounds trivial, but I could not find the function to show the last added element in a QListView. It works with a model // Create model model = new QStringListModel(this); // Make data QStringList List; // Populate our model model->setStringList(List); // Glue model and view together listView->setModel(model); Elements are added with void WidgetMessageList::addString(const QString & message) { if(model->insertRow(model->rowCount())) { QModelIndex index = model->index(model->rowCount() - 1,