I found myself a workaround, hope it will help others.

1) the application opens a View and not a query. the view is defined as follows: "select id, nationid, region, nationid as nationid2 from regions"
2) I set the relation on the 4thcolumn:
Qt Code:
  1. getModel()->setRelation(3, QSqlRelation("nations", "id", "nation"));
To copy to clipboard, switch view to plain text mode 
3) On the view swap the 4th and 3rd columns:
Qt Code:
  1. QHeaderView *headerView = view->horizontalHeader();
  2. headerView->swapSections(3, 2);
To copy to clipboard, switch view to plain text mode 
4) After I get the record for insert/update I delete the lookup columns:
Qt Code:
  1. int index = record.indexOf("nation");
  2. if (index>=0){
  3. record.remove(index);
  4. }
To copy to clipboard, switch view to plain text mode 

It is an awful workaround but it works.

bye
Mirko