@SGaist i have not come across QIdentityProxyModel yet, I will try that. thanks
just a snippet of what i am doing and is working by subclassing AbstractTableModel.
So the row color is dependent on 2 columns. its origin and its severity.
QColor EventsModelByDate::eventSeverityTextColor( int severity, QString origin ) const
{
switch ( severity ) {
case 4: /// Info
if ( origin == "FRM" || origin == "HET" || origin == "IRS" ||
origin == "SCS" || origin == "PLG" )
return QColor( 0, 40, 120 );//, Qt::ForegroundRole );
else if ( origin == "TRM" || origin == "TRS" )
return QColor( 80, 136, 180 );
else if ( origin == "VPP" || origin == "DPP" || origin == "PTP" )
return QColor( 80, 136, 180 );
else
return QColor( 0, 0, 0 );
break;
case 8: /// Warning
return QColor( 145, 70, 20 );
break;
case 16: /// Error
return QColor( 245, 0, 0);
break;
default: /// Info
return QColor( 0, 0, 0 );
break;
}
}