[PyQt] QTreeWidgetItem Parent
andreasfrickinger at me.com
Thu Aug 7 19:39:51 BST 2008
I have the following problem:
I filled a QTreeWidget with data and now want the currently selected item
back. But to process the data I also need the parents of it.
the .text() method works perfectly on the QTreeWidgetItem I created with
.currentItem(), but as soon as I am creating a QTreeWidgetItem of the parent
"NoneType Object does not have attribute text"
here is my code:
currentShot = self.loadTree.currentItem()
#throws described error
currentScene = currentShot.parent()
If I print out the type of the QTreeWidgetItem's, they are both NoneType.
Please can anybody help me? I'm lost!!!
View this message in context: http://www.nabble.com/QTreeWidgetItem-Parent-tp18877067p18877067.html
Sent from the PyQt mailing list archive at Nabble.com.
More information about the PyQt