Hi Justin,
thanks again for explaining to me. Another problem I've
been having with understanding pyQT is handling the error from .isValid().
As I am just working from Yasin Uludag's tutorial codes I often just
attempt to modify the code with stopgap solutions that may not be the
proper way or efficient way of dealing with it because I do not understand
why the methods are setup the way they are.
For example, I introduced a root parent into my model so that I could
parent all my later items under like so
class SceneGraphModel(QtCore.QAbstractItemModel):
def __init__(self, parent=None):
super(SceneGraphModel, self).__init__(parent)
self._rootNode=Node(None).
However, if I attempted a self.model.rowCount(self.model._rootNode), which
should give me 0 when queried before I add in any rows I get a :
AttributeError: 'Node' object has no attribute 'isValid'
I want to get a rowCount() off this particular parent because when I want
to insert new rows which are entered at the end of the row list, rather
than at the begining if I do it manually. What should be the proper way of
creating a main root parent?
Thank you
Gann Boon Bay
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/186acaf1-ff52-45c8-8751-00f402ba9424%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.