Hi all,

I'm writing an application with a database back-end and I'm really stuck using QDataWidgetMapper in combination with a QComboBox.

In my opinion the API documentation is a bit unclear about this and I couldn't find any examples.

Anyhow, I've got 2 tables. One table has a foreign key referring to the other table. For this field I'd like to use a QComboBox.

First of all, should I use a model with support for relations or do the id's of the foreign key suffice? Second, does QDataWidgetMapper take care of loading all available options (from the other table) into the QComboBox or should I do this? Last but not least, if I have to do this myself, what's the best way to deal with the id's of the database and the indices of the QComboBox?