I have a QSqlRelationalTableModel with a mysql driver, a tableview that shows the table which works. I am trying to add and edit records in a dialog with the fields for editing. I can transfer the data fine, but have a problem:

How do I save the data from a QDateTimeEdit?

Qt Code:
  1. model->database().transaction();
  2. qDebug() <<"saveWidgetData: datachanged"<< datachanged;
  3. //get each field's values and save.
  4. record = model->record(recid.row());
  5. //where recid is the QModelIndex
  6. record.setValue(QString("description"),descriptionTextEdit->toPlainText());
  7. record.setValue(QString("date"),dateDateTimeEdit->property("dateTime"));
To copy to clipboard, switch view to plain text mode 


then insertRecord, etc. The description is saved, new record is made, etc. No errors are reported. I've tried
Qt Code:
  1. record.setValue(QString("date"),dateDateTimeEdit->property("dateTime"));
To copy to clipboard, switch view to plain text mode 

with the same results. The date isn't inserted into the table. Any ideas?