Class: QgsFieldValuesLineEdit¶
A line edit with an autocompleter which takes unique values from a vector layer’s fields.
The autocompleter is populated from the vector layer in the background to ensure responsive interaction with the widget.
Class Hierarchy¶
Base classes¶
QLineEdit subclass with built in support for clearing the widget’s value and handling custom null value representations. |
|
- class qgis.gui.QgsFieldValuesLineEdit[source]¶
Bases:
QgsFilterLineEdit- __init__(parent: QWidget | None = None)
Constructor for QgsFieldValuesLineEdit
- Parameters:
parent (Optional[QWidget] = None) – parent widget
- attributeIndex(self) int[source]¶
Returns the attribute index for the field containing values shown in the widget.
See also
See also
- Return type:
int
- signal attributeIndexChanged[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- layer(self) QgsVectorLayer | None[source]¶
Returns the layer containing the field that values will be shown from.
See also
See also
- Return type:
Optional[QgsVectorLayer]
- signal layerChanged[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- setAttributeIndex(self, index: int)[source]¶
Sets the attribute index for the field containing values to show in the widget.
- Parameters:
index (int) – index of attribute
See also
See also
- setLayer(self, layer: QgsVectorLayer | None)[source]¶
Sets the layer containing the field that values will be shown from.
- Parameters:
layer (Optional[QgsVectorLayer]) – vector layer
See also
See also