PDA

View Full Version : Table model save on disk



giusepped
17th February 2009, 14:28
I do not know if this question has been made ever.
I wanna a feature like this.
I build a table model associated with a QTableWidget.
So, I can edit the Widget and I automatically get the model updated.
Now, is there any function in Qt which let me save without pain all the content of the model on disk? Now, I simply make a QTextStream with some formatting, and pass all the model entry to it.
It would be very valuavle to have a simple class which do the job.
For exmample:
QWriteTable p(model);
p.setFormat(::SimpleTableFormat)
p.write("filename")
Regards