Thank you for your answer.

Quote Originally Posted by anda_skoa View Post
I am not sure what you expect to see.
You tell the TableViewColumn to use "col1" as the role, yet your data has no "col1", it has "newName" and "newValue".

_
I have this XML file:
Qt Code:
  1. <?xml version="1.0" standalone="yes"?>
  2. <NewDataSet>
  3. <record prop1=".." prop10="..." />
  4. .......
  5. <record prop1=".." prop10="..."/>
  6. </NewDataSet>
To copy to clipboard, switch view to plain text mode 

And I have a TableView with this columns:
prop1, .... , prop10

I want to use newName for name of columns(name=prop1 , .. , prop10) and newValue for value of attributes in XML file.
I do not see any record in tableview.

Quote Originally Posted by anda_skoa View Post

So, from your point of view, which of these tw comparions should be true?
Qt Code:
  1. "col1" == "newName"
  2. "col1" == "newValue"
To copy to clipboard, switch view to plain text mode 

_
Excuse me, you are right. I mistake to write code here. I put "newDataList.append(new DataObject("name of column ==for example prop1", attr.value().toString())); " for test.

I can display my XML file using XmlListModel in Tableview, but I can not save all record of Tableview in XML file by using XmlListModel.
I write another code by using QAbstractTableModel, but I do not see any data after open XML file in Tableview.

If you are agree I want to put a another sample program by QAbstractTableModel.