[PySide] Moving up a tree

litltbear at gmail.com litltbear at gmail.com
Thu Jan 31 19:46:30 CET 2013


I have a tree that resembles the tree structure of computer files: A folder
with sub folders, another file with subfolders:
    A
        1
             a
             b
        2
             c
             d
    B
        3
             e
              f
       4
             g
             h

I'm using QTreeWidget, QTreeView, and QTreeWidgetItems.

I'm trying to add an item to the tree.  So if I select an item, I need to
know where in the tree I am and also the root of that sub tree.

   If I select "h" and want to add another item below it.  I Also need to
know 4 and B only, but I get g, 4, 3, B, A all as parents.  How can I only
get 4 and B as parents.

Sorry forgot to mention I am using python.
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20130131/6517cdd9/attachment.html>


More information about the PySide mailing list