Hi!
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
it says:
"NoneType Object does not have attribute text"
here is my code:
#works perfectly
currentShot = self.loadTree.currentItem()
print currentShot.text(0)
#throws described error
currentScene = currentShot.parent()
print currentScene.text(0)
If I print out the type of the QTreeWidgetItem's, they are both NoneType.
Please can anybody help me? I'm lost!!!
thx,
andy
--
View this message in context:
http://www.nabble.com/QTreeWidgetItem-Parent-tp18877067p18877067.html
Sent from the PyQt mailing list archive at Nabble.com.
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt