I have a QTableView in a PyQt application and I want to track when the selection changes. I tried to connect the signal to the slot as follows (using the tip on this page :
self.view.selectionModel().selectionChanged.connect(self.selChanged)
where the slot to which it is connected is defined as:
def selChanged(self, selected, deselected): print "Sel changed"
However, when I load the QMainWindow that the QTableView resides on, I get an immediate segmentation error.
Am I doing something stupid here?
user-interface qt pyqt qtableview
robintw
source share