If you are reading from an XML file, then I suggest you read the file into a QDomDocument instance. If you keep the data this way, it makes it easy to find an element at any level of the document, using QDomDocument::elementsByTagName(). It is also easy to build the tree from that point - just follow the QDomNodeList down deeper into the document.
Bookmarks