I searched a lot but I could not understand how to clear all items of QListView
?
I used QStringListModel
and QStringList
to fill it.
You can either use model.setStringList( QStringList{} )
, or manually delete the rows with model.removeRows( 0, model.rowCount() )
.