On 1/31/13 1:46 PM, [email protected] wrote:
> 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.

You can get the list of items selected via the selectedIndexes() method
on the tree view.  Each element returned will be a QModelIndex instance;
see http://qt-project.org/doc/qt-4.8/qmodelindex.html  The parent()
method will return the QModelIndex of the parent.

Cheers,

John

_______________________________________________
PySide mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to