That indeed seems like the way to do it, though I do have a question.
Like I said in my previous post, I have a relation between 2 tables and one model uses it while the other doesn't. That's the reason I created 2 models in the first place. So the QSqlRelationTableModel which is used in the list with only a subset of the columns displayed shows the value of the joined table while the QSqlTableModel uses the id and passes it to a QComboBox.
So how should I get this behaviour with a proxy model? Can I modify the query of the sourcemodel or proxymodel to select both the value from the joined table and the id of the parent table. Is there a best practice to do this?
Bookmarks