hi everyone,
I am trying to insert the data present in a QStandardItemModel.I have to set that data into a table present in sqlite database.I tried like below

Qt Code:
  1. QSqlTableModel table(0,db_local);
  2. table.setTable("menu_list");
  3. table.setEditStrategy(QSqlTableModel::OnManualSubmit);
  4. for(i=0;i<model->rowCount();i++)
  5. {
  6. table.insertRow(i);
  7. for(j=0;j<model->columnCount();j++)
  8. ok= table.setData(table.index(i,j),model->data(model->index(i,j)));
  9. }
To copy to clipboard, switch view to plain text mode 


In QSqlTableModel the required value is present.
But in database nothing is there.
Is there any other statement required to update the table inside database?
plz help me.

thanks