A model SessionListSqlModel, which derives from QSqlTableModel, is set as the model to a QComboBox control. What should be displayed is a compound string from multiple columns. What is the correct way to do this?
My first thought is to set QComboBox's modelColumn to one value higher then there are columns. The in the model override the data function and build the compound string for the new column.
But is there some way I could do the same type of thing with a QItemDelegate? I would prefer to use a QItemDelegate because later I might end up using this model else where and I would really prefer not to have something that is specific to this combo box in the model.
Sam
Bookmarks