Well, I'm wondering if I should bother with the invisible root item. <br>
<br>
The situation is - I have many "root" nodes coming from Maya, all going
to be displayed in column 0, and their subsequent row, with a
parent/child relationship (obviously the roots have no parent). But my
question was related to whether I should bother with this "invisible
root node", attaching parenting my Maya root nodes under the invis
root, or if I need to create my own, or if I should create one like
you've shown.<br>
<br><br><div class="gmail_quote">On Sun, Oct 25, 2009 at 2:48 AM, Baz Walter <span dir="ltr"><<a href="mailto:bazwal@ftml.net">bazwal@ftml.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Taylor Carrasco wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
How do you add an invisible root item?<br>
</blockquote>
<br></div>
by definition, there can only be one root item and that is already provided by the treewidget.<br>
<br>
something like this might do what you want:<br>
<br>
myroot = QTreeWidgetItem(mytreewidget)<br>
mytreewidget.setRootIndex(mytreewidget.indexFromItem(myroot))<br>
<br>
but note that that wont actually replace the invisible root item - it just creates a hidden top level item that can be used as the parent of all subsequent items.<br>
<br>
(as usual, it would be a lot easier to help if you told us what problem you are actually trying to solve...)<br>
</blockquote></div><br>