Hello,

I'm a bit confused after reviewing all examples related to SQL and QTableView.So many models and approaches.
What i need is very simple: QWidget with QTableView. QDialog with fields and button "add" and SQL table.
When the user enters in the fields of the dialog data and click on the button "add" the new record to appear in the table.

I have tried to achieve this firstly with QSqlQueryModel.After that i tried with QSqlTableModel.With both i can't managed to release the update of the tableView.The record is in the DB, but the table doesn't update by it's self or manually with some method.

I need an advice how to achieve this simple example.
I also need answers of:
- Do i have to update the model only and the table will be updated autimaticly.Which model, and which method to use?
- Do i need to update the tableView after inserted a new record in the DB.Which model, and which method to use?

THANK YOU IN ADVANCE