QT怎么实现把xml解析出来,并将节点信息呈现在Treeview中

QT如何实现把xml解析出来,并将节点信息呈现在Treeview中?
如题,希望能实现用QT将xmll解析出来,并将节点信息呈现在Treeview中?求比较完整的程序?
QT XML TreeView

------解决方案--------------------
我现在用的Qt版本是4.7,在安装目录下\examples\xml\streambookmarks里面就有关于通过读取xml形成树形结构的例子。我最近也是在做这个问题相关的,改了好多东西。有问题再交流。
------解决方案--------------------
解析a.xml:
<resource>
  <playlist id="247" href="/resource/playlist247.xml" md5="">
    <file id="2137" name="1370669292360.doc" displayname="2222222" type="template" />
    <file id="2138" name="1370659545224.xls" displayname="11111" type="template" " />
    <file id="2139" name="1370670308781.doc" displayname="55555555" type="template" />    
  </playlist>
</resource>

代码:
QDomDocument doc;
QFile file("./a.xml");
if (!file.open(QIODevice::ReadOnly))
     return ;
if (!doc.setContent(&file)) {
     file.close();
     return ;
}
file.close();
QDomNodeList temp = doc.elementsByTagName("playlist");
QString playlist_id=temp.at(0).toElement().attribute("id");
QString playlist_md5=temp.at(0).toElement().attribute("md5");
QString playlist_href=temp.at(0).toElement().attribute("href");

if(temp.count()>0)
{
     QDomNode node=temp.at(0).firstChild();
     while(!node.isNull())
     {
          if(node.toElement().tagName()=="file")
          {
                  QString resource_id=node.toElement().attribute("id");
                  QString resource_name=node.toElement().attribute("name");
                  QString resource_md5=node.toElement().attribute("md5");