if len(indexes) > 0:
print(tabular_format.format(
del_or_sel, index_current, index_current.row(),
index_current.data(Qt.DisplayRole).toString(),
index_parent_sel, index_internalid))
elif len(deselected.indexes()) > 0:
print(tabular_format.format(
del_or_sel, index_deselected, index_deselected.row(),
index_deselected.data(Qt.DisplayRole).toString(),
index_parent_desel, index_internalid))
#self.selectionModel.select(index_deselected,QItemSelectionModel.Deselect) # not necessary
if len(indexes) > 0:
print(tabular_format.format(
del_or_sel, index_current, index_current.row(),
index_current.data(Qt.DisplayRole).toString(),
index_parent_sel, index_internalid))
self.selectionModel.select(index_current,QItemSelectionModel.Deselect) # added statement
elif len(deselected.indexes()) > 0:
print(tabular_format.format(
del_or_sel, index_deselected, index_deselected.row(),
index_deselected.data(Qt.DisplayRole).toString(),
index_parent_desel, index_internalid))
#self.selectionModel.select(index_deselected,QItemSelectionModel.Deselect) # not necessary
To copy to clipboard, switch view to plain text mode
Bookmarks