Well i eventually managed to do it using a custom role in the tablemodel, subclassing the proxymodel and re-implementing the lessThan method.
For people interested this is my lessThan methode in the proxymodel :

Qt Code:
  1. bool MyQSortFilterProxyModel::lessThan(const QModelIndex &left,
  2. const QModelIndex &right) const
  3. {
  4. QVariant leftData = sourceModel()->data(left);
  5. QVariant rightData = sourceModel()->data(right);
  6.  
  7. if(left.data(Qt::UserRole).type() == QVariant::Double)
  8. {
  9. return (left.data(Qt::UserRole).toDouble() < right.data(Qt::UserRole).toDouble());
  10. }
  11. else if(leftData.type() == QVariant::String)
  12. {
  13. return (leftData.toString() < rightData.toString());
  14. }
  15. }
To copy to clipboard, switch view to plain text mode