diff --git a/src/core/qgsfeaturefiltermodel.cpp b/src/core/qgsfeaturefiltermodel.cpp index a466d2d14598..30e0b18a3339 100644 --- a/src/core/qgsfeaturefiltermodel.cpp +++ b/src/core/qgsfeaturefiltermodel.cpp @@ -136,6 +136,22 @@ QVariant QgsFeatureFilterModel::data( const QModelIndex &index, int role ) const case IdentifierValueRole: return mEntries.value( index.row() ).identifierValue; + + case Qt::ForegroundRole: + if ( mEntries.value( index.row() ).identifierValue.isNull() ) + { + return QBrush( QColor( Qt::gray ) ); + } + break; + + case Qt::FontRole: + if ( mEntries.value( index.row() ).identifierValue.isNull() ) + { + QFont font = QFont(); + font.setItalic( true ); + return font; + } + break; } return QVariant();