I have a XML file with the following structure:
<?xml version="1.0" encoding="utf-8"?>
<isl_project_command>
<task>
<code>root</code>
<parent_code></parent_code>
<start_date>date</start_date>
</task>
<task>
<code>child1</code>
<parent_code>root</parent_code>
<start_date>date</start_date>
</task>
<task>
<code>child1.1</code>
<parent_code>child1</parent_code>
<start_date>date</start_date>
</task>
</isl_project_command>
<?xml version="1.0" encoding="utf-8"?>
<isl_project_command>
<task>
<code>root</code>
<parent_code></parent_code>
<start_date>date</start_date>
</task>
<task>
<code>child1</code>
<parent_code>root</parent_code>
<start_date>date</start_date>
</task>
<task>
<code>child1.1</code>
<parent_code>child1</parent_code>
<start_date>date</start_date>
</task>
</isl_project_command>
To copy to clipboard, switch view to plain text mode
Now i try to build a QStandardModel of this structure for displaying data in a QTreeView.
The problem is i don't know how to create a hierarchy tree of the data.
The tree should look something like this:
Bookmarks