listwidget = <QListWidget> for index in range(listwidget.count()): item = listwidget.item(index) item.setFlags(item.flags() | Qt.ItemIsEditable)