How to set QTreeView from an XML file?
Hi,
I want to set QTreeView model from an XML file? I tried with Qt exemples but they are for QTreeWidget, I did not succeed to convert one of exemple to work with QTreeView(with model).
I have an XML file like below.
Code:
<root>
<Folder Name="myFolder">
<File Name="myFile" />
</Folder>
<Folder Name="mySecondFolder">
<File Name="myFile2" />
<File Name="myFile3" />
<File Name="myFile4" />
</Folder>
</root>
Re: How to set QTreeView from an XML file?
I think this example from the Qt distribution is what you need. The XML you showed above is not a properly complete XML document; it is missing the XML header information, so the DOM parser will probably reject it. Be sure you have a correct XML file.
Re: How to set QTreeView from an XML file?
I will try, thanks for reply.