Hey Guys,
I don't understand this problem here.
I am quiet new to python and pyside in Maya to be specific and I am maintaining & extending existing code.
Now I need a solution to list all items inside a READ CAREFUL NOW 'QTreeView'.
When I look in the internet about QTreeView lots of people say there is no way to get all items as strings with their index with one command.
Only by surfing thru all topLevelItems and all childItems or so.
ok, so I tried:
print self.lightListerTree.topLevelItemCount()
print self.lightListerTree.topLevelItemCount()
To copy to clipboard, switch view to plain text mode
and I get the following error:
# AttributeError: 'PySide.QtGui.QTreeView' object has no attribute 'topLevelItemCount'
# AttributeError: 'PySide.QtGui.QTreeView' object has no attribute 'topLevelItemCount'
To copy to clipboard, switch view to plain text mode
Does anyone have an idea what I was doing wrong?
And if anyone every written already a functioning class to just loop thru all top level and child nodes, very welcome.
what I am trying to do: the user has an item selected (I know it's name as string) and I need to select the same item in the QTreeView.
btw. no matter what I try I always get this error:
# AttributeError: 'PySide.QtGui.QTreeView' object has no attribute 'findItems'
# AttributeError: 'PySide.QtGui.QTreeView' object has no attribute 'findItems'
To copy to clipboard, switch view to plain text mode
# AttributeError: 'PySide.QtGui.QTreeView' object has no attribute 'MatchRecursive'
# AttributeError: 'PySide.QtGui.QTreeView' object has no attribute 'MatchRecursive'
To copy to clipboard, switch view to plain text mode
there's something fishy right? I have to get the name of the QTreeView aswell maybe?
Bookmarks