July 13, 2011

p91paul p91paul
Lab Rat
26 posts

[solved]Mapping a QComboBox displaying multiple columns

 

hi everybody,
I’m using a QSqlRelationalTableModel with a QWidgetMapper.
For a field I need to show in a combo box name and surname that are in two different columns of the table, but I have to select only one ModelColumn of the model;
I know I can use a QSqlQueryModel with a concat, but doesn’t it break the mapping if I don’t use model->relationModel() as the combobox model?
thank you
Paolo

2 replies

July 14, 2011

ludde ludde
Lab Rat
287 posts

Haven’t used any of those classes, but it looks like something you might want to create a QAbstractProxyModel [doc.qt.nokia.com] subclass for.

July 14, 2011

p91paul p91paul
Lab Rat
26 posts

what a wonderful thing I’ve discovered! =D thanks a lot

 
  ‹‹ Please suggest some example for capturing mouse movement co-ordinates X,Y position in the entire windiow??      [Solved] Mapping a column from a table to a QComboBox ››

You must log in to post a reply. Not a member yet? Register here!