I've got a QTreeWidget item and the signal CurrentItemChanged connected to a method that updates the GUI based on a DB lookup.
The CurrentItemChanged documentation says it will pass QTreeWidgetItems as arguments to the method. First the current item, then the item that had been selected previously.
I am seeing a QTreeWidgetItem followed by an integer, probably the column of the currently selected item, getting passed instead. This behavior does not seem to be part of anyone's documentation for Pyqt5.
Before I go storing references to the previous Item myself, is there something I am missing? The code is depressingly simple:
self.TreeWidget.currentItemChanged.connect(self.update) # signal connect
def update(self, old, new):
# do stuff with old and new, both as as QTreeWidgetItems