From the book I'm reading:
By default, QListWidget is read-only. If we wanted the user to edit the items, we could set the view's edit triggers using QAbstractItemView::setEditTriggers(); for example, a setting of QAbstractItemView::AnyKeyPressed means that the user can begin editing an item just by starting to type.
So, I call the function in my code:
ui->listWidget->setEditTriggers(QAbstractItemView::AnyKeyPressed);
But when I select an item and start typing, nothing happens.
QTreeView
,self.model.setReadOnly(False)
can solve this problem. It is struck me long time, make a note here. – Chancellery