Class: QgsFieldValuesLineEdit

class qgis.gui.QgsFieldValuesLineEdit

Bases: QgsFilterLineEdit

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.

New in version 3.0.

QgsFieldValuesLineEdit(parent: QWidget = None) Constructor for QgsFieldValuesLineEdit

Parameters

parent

parent widget

Methods

actionEvent

attributeIndex

Returns the attribute index for the field containing values shown in the widget.

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

create

cursorRect

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

initStyleOption

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

layer

Returns the layer containing the field that values will be shown from.

leaveEvent

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

receivers

resizeEvent

sender

senderSignalIndex

setAttributeIndex

Sets the attribute index for the field containing values to show in the widget.

setLayer

Sets the layer containing the field that values will be shown from.

sharedPainter

showEvent

tabletEvent

timerEvent

updateMicroFocus

wheelEvent

Signals

attributeIndexChanged

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

layerChanged

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

actionEvent(self, QActionEvent)
attributeIndex(self) int

Returns the attribute index for the field containing values shown in the widget.

See also

layer()

Return type

int

attributeIndexChanged

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.

Parameters
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type

PYQT_SIGNAL

changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
cursorRect(self) QRect
customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
focusInEvent(self, e: QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
initStyleOption(self, QStyleOptionFrame)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
layer(self) QgsVectorLayer

Returns the layer containing the field that values will be shown from.

See also

setLayer()

See also

attributeIndex()

Return type

QgsVectorLayer

layerChanged

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.

Parameters
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type

PYQT_SIGNAL

leaveEvent(self, QEvent)
metric(self, QPaintDevice.PaintDeviceMetric) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, e: QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int]
paintEvent(self, QPaintEvent)
receivers(self, PYQT_SIGNAL) int
resizeEvent(self, QResizeEvent)
sender(self) QObject
senderSignalIndex(self) int
setAttributeIndex(self, index: int)

Sets the attribute index for the field containing values to show in the widget.

Parameters

index (int) – index of attribute

See also

attributeIndex()

See also

setLayer()

setLayer(self, layer: QgsVectorLayer)

Sets the layer containing the field that values will be shown from.

Parameters

layer (QgsVectorLayer) – vector layer

See also

layer()

sharedPainter(self) QPainter
showEvent(self, QShowEvent)
tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
wheelEvent(self, QWheelEvent)