Does qdatawidgetmapper update databases?

I used the code that can be found at the link below and modified it just to connect to my database(all i did was change "bool createConnections"; nothing else).

http://www.trolltech.com/developer/t...ntry&id=147264

I ran the code and got it to work. I changed
Qt Code:
  1. #if 1
  2. model->setEditStrategy(QSqlTableModel::OnFieldChange);
  3. #else
  4. model->setEditStrategy(QSqlTableModel::OnManualSubmit);
  5. #endif
To copy to clipboard, switch view to plain text mode 

to

Qt Code:
  1. #if 0 //changed 1 to 0;thats all
  2. model->setEditStrategy(QSqlTableModel::OnFieldChange);
  3. #else
  4. model->setEditStrategy(QSqlTableModel::OnManualSubmit);
  5. #endif
To copy to clipboard, switch view to plain text mode 

and the view was updated perfectly; using the mapped lineEdit . But when i go back to the command prompt and check the database, nothing has changed.

Can someone tell me how to update the database using the mapped widget?

My code follows the exact same procedure as that in the link, with only some formatting differences. My mapped widgets does not update the database, the ones in the code at the above URL does not update the database either.