It definitely one way to go but it gets messy. If I make changes to the 0 column the changes will be saved in the 'swap' column. Eventually I'll have to accommodate this change in index, parent, mapToSource, mapFromSource aswell right?

Below I'm substituting the branch column with 0 column and vica versa.

This is my new implementation;
Qt Code:
  1. QVariant MyProxyModel::data ( const QModelIndex & index, int role ) const
  2. {
  3. if (!index.isValid())
  4. return QVariant();
  5.  
  6. if(index.column() == m_branchcolumn)
  7. {
  8. QModelIndex changed = index.sibling(index.row(), 0);
  9. return QAbstractProxyModel::data(changed, role);
  10. }
  11. if(index.column() == 0)
  12. {
  13. QModelIndex changed = index.sibling(index.row(), m_branchcolumn);
  14. return QAbstractProxyModel::data(changed, role);
  15. }
  16. return QAbstractProxyModel::data(index, role);
  17. }
To copy to clipboard, switch view to plain text mode 

I haven't gotten it to work correctly yet but I think this might be the way forward. Thanks for you input.