C++ (Qt)... if(role==Qt::BackGroundColorRole) return QBrush("yellow")...
C++ (Qt) bool filterAcceptsRow(int source_row, const QModelIndex &source_parent){ QModelIndex index = sourceModel()->index(source_row,1,source_parent); QVariant value = sourceModel()->data(index,Qt::DisplayRole); if(value.isValid){ int date = value.toInt(); return date == filter; } return QSortFilterProxyModel::filterAcceptsRow(source_row,source_parent);}
void setFilterRole(int )int filterRоle()
C++ (Qt)QVariant ProxyModel::data( const QModelIndex &index, int role ) const{ ... if( role==Qt::BackGroundColorRole ) { const QModelIndex src = mapToSource( index ); if( filterAcceptsRow( src.row(), QModelIndex() ) ) return QBrush("yellow"); } return QVariant();}