Class: QgsFieldProxyModel

class qgis.core.QgsFieldProxyModel(parent: QObject = None)

Bases: PyQt5.QtCore.QSortFilterProxyModel

QgsFieldProxModel creates a proxy model with a QgsFieldModel as source model. It can be used to filter the fields based on their types.

The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer.

AllTypes = 63
Date = 16
DateTime = 128
Double = 8
class Filter

Bases: int

class Filters

Bases: sip.wrapper

QgsFieldProxyModel.Filters(Union[QgsFieldProxyModel.Filters, QgsFieldProxyModel.Filter]) QgsFieldProxyModel.Filters(QgsFieldProxyModel.Filters)

baseClass

alias of QgsFieldProxyModel

HideReadOnly = 64
Int = 2
LongLong = 4
Numeric = 14
String = 1
Time = 32
beginInsertColumns()
beginInsertRows()
beginMoveColumns()
beginMoveRows()
beginRemoveColumns()
beginRemoveRows()
beginResetModel()
changePersistentIndex()
changePersistentIndexList()
childEvent()
connectNotify()
createIndex()
customEvent()
decodeData()
disconnectNotify()
encodeData()
endInsertColumns()
endInsertRows()
endMoveColumns()
endMoveRows()
endRemoveColumns()
endRemoveRows()
endResetModel()
filterAcceptsColumn()
filterAcceptsRow(self, source_row: int, source_parent: QModelIndex) → bool
filters(self) → QgsFieldProxyModel.Filters

Returns the filters controlling displayed fields.

See also

setFilters()

invalidateFilter()
isSignalConnected()
lessThan(self, left: QModelIndex, right: QModelIndex) → bool
persistentIndexList()
receivers()
resetInternalData()
sender()
senderSignalIndex()
setFilters(self, filters: Union[QgsFieldProxyModel.Filters, QgsFieldProxyModel.Filter]) → QgsFieldProxyModel

Set flags that affect how fields are filtered in the model.

Parameters

filters – are Filter flags

See also

filters()

sourceFieldModel(self) → QgsFieldModel

Returns the QgsFieldModel used in this QSortFilterProxyModel

timerEvent()