[PyQt] selecting an item in qtreeview

Jason Rahm J.Rahm at F5.com
Wed Jun 29 21:47:43 BST 2011


When using qtreewidget, I can use the itemClicked method to then call a def:

self.treeWidget_iRulesList.itemClicked.connect(self.displayRule)

However, I hit a wall in trying to pass data around this way, so I watched some tutorials on how to set up a model view and abstract the data from the GUI components.  This involved switching from a treeWidget to a treeView.  This works great in populating the tree, but now I don't know how to signal a clicked item and pass that item (and the tree parent it belongs to) to my displayRule def.  Any thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110629/d540560e/attachment-0001.html>


More information about the PyQt mailing list