[PyQt] QTreeWidget invisible root item
crackerbunny at gmail.com
Sun Oct 25 20:45:34 GMT 2009
Well, I'm wondering if I should bother with the invisible root item.
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.
On Sun, Oct 25, 2009 at 2:48 AM, Baz Walter <bazwal at ftml.net> wrote:
> Taylor Carrasco wrote:
>> How do you add an invisible root item?
> by definition, there can only be one root item and that is already provided
> by the treewidget.
> something like this might do what you want:
> myroot = QTreeWidgetItem(mytreewidget)
> 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.
> (as usual, it would be a lot easier to help if you told us what problem you
> are actually trying to solve...)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt