Hi!

I need to export a QStandardModelItem to an XML-File.

Qt Code:
  1. //put stuff inside
  2.  
  3. //then walk through the childs using
  4.  
  5. QStandardItem * item = mod->invisibleRootItem();
  6. exportChild(item,out) ;
  7.  
  8. //writing the XMLFile using recursion of exportChild()
  9.  
  10. exportChild()
  11. {
  12. if (item->hasChildren())
  13. ...
  14. exportChild(item,out)
  15.  
  16. }
To copy to clipboard, switch view to plain text mode 

Is this the best way to do that or is there an easier or better solution?

Kind regards,
HomeR