Hi. I have the following situation: A QComboBox holds the 7 days of the week. It is filled using the QDate::longDayName() function so i get the dates in the right language. An Additional "select day" entry is inserted at the top so that the indexes correspond with the Dayofweek numbers from Qt.

The model (stored in a db) that i want to change has several fields, the one in question being the "dayofweek" field. For the mapper I tried
Qt Code:
  1. mapper->addMapping(ui.comboBox, model->fieldIndex("dayofweek"));
To copy to clipboard, switch view to plain text mode 
but that doesn't work. What I want it to do is store the current index in the "dayofweek"-column of the model. All other values (lineedits and such) work fine.

How would I go about doing this? The tutorials I found on the web use QRelationalSqlTable as a base but since i want the weekdays internationalised this is not an option.