Hi,

Here is my app in general:

QTableView data list populated from database, the view is based on QSqlRelationalTableModel.
Some columns in the view are displayed directly from the main table, some from related tables by foreign keys.

Editing data is made by Dialog, I use QDataWidgetMapper to map model field to dialog widgets. Everything works fine.

But for some reasons I want to get foreign key value in dialog for columns where foreign keys are replaced with i.e. name data (related to foreign key). Is there any method to do it?

regards
kawoN