I am trying to restrict selection of a tree to a particular column.
I am using delegates heavily to create custom per-item-per-column behaviors, editors, etc. I was hop
The following adjustment should work, in theory.
The above solution could use two separate methods and @pyqtSlot decorators to disambiguate the overloaded method names:
@pyqtSlot(QModelIndex, QItemSelectionModel.SelectionFlags)
def select(self, index, command):
# ...
@pyqtSlot(QItemSelection, QItemSelectionModel.SelectionFlags)
def select(self, selection, command):
#...
This avoids the need to check for instances of certain classes in the method implementations.