I dont find a fullpath property for an item selected on a QTreeWidget.
Any help ? It does not exist ?
Have I to get the parents to build the path myself ?
I dont find a fullpath property for an item selected on a QTreeWidget.
Any help ? It does not exist ?
Have I to get the parents to build the path myself ?
No. There is no method. but it's better to write your own subclass of QTreeWidgetItemand use it instead of writing related code more than one time in your code.
QList<QTreeWidgetItem*> myTreeWidgetItem:: pathToRoot(){
QTreeWidgetItem* current = this;}
QList<QTreeWidgetItem*> ret;
while(current)
{
ret.push_back(current);}
current = current.parent();
return ret;
Bookmarks