Hi all, I am having some issues with QTreeView where I populates the information from another model.
While trying to perform the selection within the tree view, it is suppose to be returning me the full path of the selection. However for some reasons, there is always a 'NoneType' object/ something in which it will returns me 2 items - the selection and a None.
For example, if I have the following tree:
* ObjectA
** ObjectB
*** ObjectC
# And selected ObjectC, the full path should be - |ObjectA|ObjecBA|ObjectC but instead I got |None|ObjectA|ObjecBA|ObjectC
One way that I have rectified this problem is using `try... except <either Attribute or TypeError>` in the selectionChanged connection for the tree view and for the displaying of data in the model where it checks if the role equates to `QtCore.Qt.DisplayRole`.
About the latter - Correct me if I am wrong, but doesn't QtCore.Qt.DisplayRole valid only if there are characters/strings in the field? If so, it should not be deriving the empty values, right?
(I apologize in advance that the code may not work on a typical maya scene for some portions within are custom stuff used. Also I have listed out the error portions, search using #>>>)
Appreciate for any insights!