def setData(self, column, value, role=Qt.EditRole):
    if (role in (Qt.EditRole, Qt.UserRole)):
        column = (0 if (column == 1) else 1)
    return super().setData(column, value, role)
def setData(self, column, value, role=Qt.EditRole):
    if (role in (Qt.EditRole, Qt.UserRole)):
        column = (0 if (column == 1) else 1)
    return super().setData(column, value, role)