Hi,

currently I am using 2 subclasses of QSortFilterProxyModel

Some of the data needs to be editable, some data not. So i made a QSortFilterProxyModelDisableEdit that does only remove the editable flag from a column.
On some tables I need an extra column that is not in the database. There for i used a ProxyModel described in this threat.

The objects are connected in the following way:
Qt Code:
  1. QSqlTableModel* DataTable = new QSqlTableModel();
  2.  
  3. SqlProxyModelAddColumn* AddColumn = new SqlProxyModelAddColumn();
  4. AddColumn->setSourceModel(DataTable);
  5.  
  6. SqlProxyModelDisalbeEdit* DisableEdit = new SqlProxyModelDisalbeEdit();
  7. DisableEdit->setSourceModel(AddColumn);
To copy to clipboard, switch view to plain text mode 


Noting is set in DisableEdit so it acts like a QSqlProxyModel,
AddColumn implementation is descriped in ProxyModel

When i try to edit some value for the DataTable all works fine.
but when i try to edit a value for the added column set data is never called. So i think there is something going wrong with the indexes, but i cant find the problem.

Any help is appreciated, thanks.