Class: QgsFeatureFilterModel

Provides a list of features based on filter conditions.

Features are fetched asynchronously.

Class Hierarchy

Inheritance diagram of qgis.core.QgsFeatureFilterModel

Base classes

QgsFeaturePickerModelBase

Provides a list of features based on filter conditions.

QAbstractItemModel

QObject

Abstract Methods

requestToReloadCurrentFeature

setExtraIdentifierValueToNull

Allows specifying one value that does not need to match the filter criteria but will still be available in the model as NULL value(s).

Methods

extraIdentifierValue

extraIdentifierValues

Allows specifying one value that does not need to match the filter criteria but will still be available in the model.

identifierField

The identifier field should be a unique field that can be used to identify individual features.

identifierFields

The identifier field should be a unique field that can be used to identify individual features.

setExtraIdentifierValue

setExtraIdentifierValueUnguarded

setExtraIdentifierValues

Allows specifying one value that does not need to match the filter criteria but will still be available in the model.

setIdentifierFields

The identifier field should be a unique field that can be used to identify individual features.

Signals

extraIdentifierValuesChanged

Allows specifying one value that does not need to match the filter criteria but will still be available in the model.

identifierFieldsChanged

The identifier field should be a unique field that can be used to identify individual features.

class qgis.core.QgsFeatureFilterModel[source]

Bases: QgsFeaturePickerModelBase

__init__(parent: QObject | None = None)

Create a new QgsFeatureFilterModel, optionally specifying a parent.

Parameters:

parent (Optional[QObject] = None)

extraIdentifierValue()
extraIdentifierValues(self) List[Any][source]

Allows specifying one value that does not need to match the filter criteria but will still be available in the model.

Added in version 3.10.

Return type:

List[Any]

signal extraIdentifierValuesChanged[source]

Allows specifying one value that does not need to match the filter criteria but will still be available in the model.

identifierField(self) str[source]

The identifier field should be a unique field that can be used to identify individual features. It is normally set to the primary key of the layer. If there are several identifier fields defined, the behavior is not guaranteed

Deprecated since version 3.10: Use identifierFields() instead.

Return type:

str

identifierFields(self) List[str][source]

The identifier field should be a unique field that can be used to identify individual features. It is normally set to the primary key of the layer.

Added in version 3.10.

Return type:

List[str]

signal identifierFieldsChanged[source]

The identifier field should be a unique field that can be used to identify individual features. It is normally set to the primary key of the layer.

abstract requestToReloadCurrentFeature()[source]
setExtraIdentifierValue()
abstract setExtraIdentifierValueToNull(self)[source]

Allows specifying one value that does not need to match the filter criteria but will still be available in the model as NULL value(s).

Added in version 3.10.

setExtraIdentifierValueUnguarded()
setExtraIdentifierValues(self, extraIdentifierValues: Iterable[Any])[source]

Allows specifying one value that does not need to match the filter criteria but will still be available in the model.

Added in version 3.10.

Parameters:

extraIdentifierValues (Iterable[Any])

setIdentifierFields(self, identifierFields: Iterable[str | None])[source]

The identifier field should be a unique field that can be used to identify individual features. It is normally set to the primary key of the layer.

Note

This will also reset identifier fields to NULL

Added in version 3.10.

Parameters:

identifierFields (Iterable[Optional[str]])