I have successfully set up a ui form with a QTableView, the model is set to QSqlRelationTableModel. The basic operations are working. Now I need to enhance some of the columns to alter the display of the data and how the data will be edited.
I am fine with subclassing both the model and the delegate. However I am a bit baffled about what methods comprise or belong in the model and what belongs in the delegate. I have reviewed the Qt documentation as best as I can, but I feel that I am missing some fundamental understanding about these classes. I have read through several examples but nothing seems to provide a clear definition of when the methods in these
classes are called.
For example, I was able to alter the display of one column in the model by adding the data() method to my custom model. But then I read that paint() in the delegate should handle this.
Can anyone shed some light on this issue? If there is a more appropriate group in this forum to post my question, please let me know.
Thank you,
Barbara
Bookmarks