Implement a custom delegate and reimplement setModelData() and setEditorData() so that it performs the conversion between the model and the editor. Then set your custom delegate on the widget mapper. I don't know if QSqlTableModel reads your enums properly, I doubt so, so you might also have to subclass the model and "fix" it according to your use-case.





Reply With Quote

Bookmarks