Hello
I've got following problem since a week:
I have a QSqlTableModel that I use to view data from a database in a calendar
Qt Code:
  1. model=new QSqlTableModel(0,db);
  2. query=new QSqlQuery(db);
To copy to clipboard, switch view to plain text mode 
db is a QSqlDatabase
When i want to make a query from the database using a SQL statement i use " query" that is connected to db

When i want to insert record i proceed like that:
I create a QSqlRecord that contains values of the new record then I call
Qt Code:
  1. model->insertRecord(-1,record)
To copy to clipboard, switch view to plain text mode 

The problem is that although the recording is successfull (when closing the programm and re-open it i can see it) but it seems like the database would be updated only when closing it because i can not see it through a query just after insertion although i call model->submitAll after each insertion .. and trying different EditStrategy..

Any ideas? Don't hesitate to give me advice on how to do it easier as i'm not very good with Programming