class StringListModel(QAbstractListModel): def __init__(self, strings, parent=None): ... def rowCount(self, parent=QModelIndex()): ... def data(self, index, role): ... def headerData(self, section, orientation, role=Qt.DisplayRole): ... def flags(self, index): ... def setData(self, index, value, role=Qt.EditRole): ... def insertRows(self, position, rows, parent): ... def removeRows(self, position, rows, parent): ...