homerun4711
22nd December 2010, 10:45
Hi!
I need to export a QStandardModelItem to an XML-File.
QStandardItemModel *mod;
//put stuff inside
//then walk through the childs using
QStandardItem * item = mod->invisibleRootItem();
exportChild(item,out) ;
//writing the XMLFile using recursion of exportChild()
exportChild()
{
if (item->hasChildren())
...
exportChild(item,out)
}
Is this the best way to do that or is there an easier or better solution?
Kind regards,
HomeR
I need to export a QStandardModelItem to an XML-File.
QStandardItemModel *mod;
//put stuff inside
//then walk through the childs using
QStandardItem * item = mod->invisibleRootItem();
exportChild(item,out) ;
//writing the XMLFile using recursion of exportChild()
exportChild()
{
if (item->hasChildren())
...
exportChild(item,out)
}
Is this the best way to do that or is there an easier or better solution?
Kind regards,
HomeR