PDA

View Full Version : QSqlTableModel Help pls



munna
26th January 2006, 06:10
Hi,

I am using SQLite as my database. I have around 12 tables from which data needs to be taken and displayed. I am not displaying the data in tables or tree format but some custom format. My doubt is that, can I use QSqlTableModel for my task?

Also the user might edit the data and add some data into the table. How can I do the editing part using the QSqlTableModel?

Thanks a lot

yogeshm02
26th January 2006, 08:58
I am using SQLite as my database. I have around 12 tables from which data needs to be taken and displayed. I am not displaying the data in tables or tree format but some custom format. My doubt is that, can I use QSqlTableModel for my task?

Yes


Also the user might edit the data and add some data into the table. How can I do the editing part using the QSqlTableModel?

If i understand you correctly, QSqlTableModel should itself do that. You just need to use QSqlTableModel::setData()