PDA

View Full Version : problem in doing database program



wei243
4th April 2007, 12:01
i m trying to write a simple database program using "QSqlTableModel" and present the data in a tabular form.
i manage to read/modify the data with "QTableView" if there are some data in the database's table.
but i cannot add any new row to "QTableView".

below is the source code i tried but it never work.:(

QTableView->setmodel(QSqlTableModel)
QTableView->model()->insertRow(row)


pls tell me what should i do.... thx.