I have a QListWidget and I need to remove some items.
From what I\'ve researched, this is a generally unpleasant thing to do.
I\'ve read a tonne of solut
That's weird there isn't some direct way to delete items from QListWidget ... Try this:
listWidget = self.ListDialog.ContentList
model = listWidget.model()
for selectedItem in listWidget.selectedItems():
qIndex = listWidget.indexFromItem(selectedItem)
print 'removing : %s' %model.data(qIndex).toString()
model.removeRow(qIndex.row())