I created a table in my dialog window using QTableView.

Now I want to add a button "Export to Excel" which allows the user to click and then
export the data in table to a *.xml file.

Are there any examples/sample codes I can refer which is similar to what I want?

Thank You.