I use a QSqlRelationalTableModel and a QTableView as follows:
Qt Code:
  1. tableModel->setEditStrategy(QSqlTableModel::OnManualSubmit);
  2. // tableModel->setEditStrategy(QSqlTableModel::OnFieldChange);
  3. tableModel->setTable(QLatin1String("Table1"));
  4. tableModel->setRelation(0, QSqlRelation(QLatin1String("Table2"), QLatin1String("Number"), QLatin1String("String")));
  5. tableModel->select();
  6. tableView->setModel(tableModel);
  7. tableView->resizeColumnsToContents();
  8. Q_ASSERT(delegate);
  9. tableView->setItemDelegate(delegate);
To copy to clipboard, switch view to plain text mode 
When I manually edit a value in the first column (i.e., a foreign key) a combo box presents the display values of Table2. However, when I pick one of these values, the view displays the key instead of the display value until I submitAll(). Is this behaviour expected?
When I use Qt::OnFieldChange as edit strategy, then the view displays instantly the display value; presumably since the change is submitted automatically.