Hi,
I can't figure out how to properly connect an instance of a QAbstractItemView to a signal. I've tried all kinds of different things based on bits that I've read but have yet to stumble on the magic formula.
What I'm trying to do is connect the arrow keys to a QTreeView so that when the user scrolls up and down the tree then another function is called. Based on what I've read the proper way to do this is through using the QAbstractItemView and connect to selectionModel().
Here's my latest version:
treeModel = self.ui.areaTree.selectionModel()
QtCore.QObject.connect(treeModel, QtCore.SIGNAL(QtGui.QAbstractItemView.CursorAction ), self.keyPress)
I'm using Python and PyQt4. I've broken out the treeModel just to make sure I had accessed it properly. Can someone please point out the proper code.
Thanks
Bookmarks