Compare commits

...

2 Commits

1 changed files with 9 additions and 0 deletions

View File

@ -96,6 +96,15 @@ class ComboBoxDelegate(QItemDelegate):
class TableModel(PamhyrTableModel):
def is_same_data(self, index, value):
row = index.row()
column = index.column()
if self._headers[column] == "type":
return int(self._data.data[row][column]) == int(value)
return super(TableModel, self).is_same_data(index, value)
def data(self, index, role):
if role == Qt.TextAlignmentRole:
return Qt.AlignHCenter | Qt.AlignVCenter