Subgroup: Field

Class: QgsFieldValuesLineEdit

class qgis.gui.QgsFieldValuesLineEdit

Bases: qgis._gui.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: Methods

acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction addAction(self, QAction, QLineEdit.ActionPosition)
addActions
adjustSize
alignment
attributeIndex Returns the attribute index for the field containing values shown in the widget.
autoFillBackground
backgroundRole
backspace
baseSize
blockSignals
changeEvent
childAt childAt(self, int, int) -> QWidget
childEvent
children
childrenRect
childrenRegion
clear
clearFocus
clearMask
clearMode Returns the clear mode for the widget.
clearValue Clears the widget and resets it to the null value.
close
closeEvent
colorCount
completer
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
copy
create
createStandardContextMenu
createWindowContainer
cursor
cursorBackward
cursorForward
cursorMoveStyle
cursorPosition
cursorPositionAt
cursorRect
cursorWordBackward
cursorWordForward
customEvent
cut
defaultValue Returns the default value for the widget.
del_
deleteLater
depth
deselect
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
disconnect
disconnectNotify
displayText
dragEnabled
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
echoMode
effectiveWinId
end
ensurePolished
enterEvent
event
eventFilter
find
findChild findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
findChildren findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPolicy
focusPreviousChild
focusProxy
focusWidget
font
fontInfo
fontMetrics
foregroundRole
frameGeometry
frameSize
geometry
getContentsMargins
getTextMargins
grab
grabGesture
grabKeyboard
grabMouse grabMouse(self, Union[QCursor, Qt.CursorShape])
grabShortcut
graphicsEffect
graphicsProxyWidget
hasAcceptableInput
hasFocus
hasFrame
hasHeightForWidth
hasMouseTracking
hasSelectedText
hasTabletTracking
height
heightForWidth
heightMM
hide
hideEvent
home
inherits
initPainter
initStyleOption
inputMask
inputMethodEvent
inputMethodHints
inputMethodQuery inputMethodQuery(self, Qt.InputMethodQuery, Any) -> Any
insert
insertAction
insertActions
installEventFilter
isActiveWindow
isAncestorOf
isClearButtonEnabled
isEnabled
isEnabledTo
isFullScreen
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isModified
isNull Determine if the current text represents null.
isReadOnly
isRedoAvailable
isRightToLeft
isSignalConnected
isUndoAvailable
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
keyPressEvent
keyReleaseEvent
keyboardGrabber
killTimer
layer Returns the layer containing the field that values will be shown from.
layout
layoutDirection
leaveEvent
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
maxLength
maximumHeight
maximumSize
maximumWidth
metaObject
metric
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move move(self, int, int)
moveEvent
moveToThread
nativeEvent
nativeParentWidget
nextInFocusChain
normalGeometry
nullValue Returns the string used for representating null values in the widget.
objectName
overrideWindowFlags
overrideWindowState
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
paste
physicalDpiX
physicalDpiY
placeholderText
pos
previousInFocusChain
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
raise_
receivers
rect
redo
releaseKeyboard
releaseMouse
releaseShortcut
removeAction
removeEventFilter
render render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))
repaint repaint(self, int, int, int, int)
resize resize(self, int, int)
resizeEvent
restoreGeometry
saveGeometry
scroll scroll(self, int, int, QRect)
selectAll
selectOnFocus Will select all text when this widget receives the focus.
selectedText
selectionStart
sender
senderSignalIndex
setAcceptDrops
setAccessibleDescription
setAccessibleName
setAlignment
setAttribute
setAttributeIndex Sets the attribute index for the field containing values to show in the widget.
setAutoFillBackground
setBackgroundRole
setBaseSize setBaseSize(self, QSize)
setClearButtonEnabled
setClearMode Sets the clear mode for the widget.
setCompleter
setContentsMargins setContentsMargins(self, QMargins)
setContextMenuPolicy
setCursor
setCursorMoveStyle
setCursorPosition
setDefaultValue Sets the default value for the widget.
setDisabled
setDragEnabled
setEchoMode
setEnabled
setFixedHeight
setFixedSize setFixedSize(self, int, int)
setFixedWidth
setFocus setFocus(self, Qt.FocusReason)
setFocusPolicy
setFocusProxy
setFont
setForegroundRole
setFrame
setGeometry setGeometry(self, int, int, int, int)
setGraphicsEffect
setHidden
setInputMask
setInputMethodHints
setLayer Sets the layer containing the field that values will be shown from.
setLayout
setLayoutDirection
setLocale
setMask setMask(self, QRegion)
setMaxLength
setMaximumHeight
setMaximumSize setMaximumSize(self, QSize)
setMaximumWidth
setMinimumHeight
setMinimumSize setMinimumSize(self, QSize)
setMinimumWidth
setModified
setMouseTracking
setNullValue Sets the string representation for null values in the widget.
setObjectName
setPalette
setParent setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])
setPlaceholderText
setProperty
setReadOnly
setSelectOnFocus Will select all text when this widget receives the focus.
setSelection
setShortcutAutoRepeat
setShortcutEnabled
setShowClearButton Sets whether the widget’s clear button is visible.
setShowSearchIcon Define if a search icon shall be shown on the left of the image
setShowSpinner Show a spinner icon.
setSizeIncrement setSizeIncrement(self, QSize)
setSizePolicy setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)
setStatusTip
setStyle
setStyleSheet
setTabOrder
setTabletTracking
setText
setTextMargins setTextMargins(self, QMargins)
setToolTip
setToolTipDuration
setUpdatesEnabled
setValidator
setValue Sets the current text for the widget with support for handling null values.
setVisible
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
sharedPainter
show
showClearButton Returns true if the widget’s clear button is visible.
showEvent
showFullScreen
showMaximized
showMinimized
showNormal
showSearchIcon Returns if a search icon shall be shown on the left of the image
showSpinner Show a spinner icon.
signalsBlocked
size
sizeHint
sizeIncrement
sizePolicy
stackUnder
startTimer
statusTip
style
styleSheet
tabletEvent
testAttribute
text
textMargins
thread
timerEvent
toolTip
toolTipDuration
tr
underMouse
undo
ungrabGesture
unsetCursor
unsetLayoutDirection
unsetLocale
update update(self, QRect)
updateGeometry
updateMicroFocus
updatesEnabled
validator
value Returns the text of this edit with support for handling null values.
visibleRegion
whatsThis
wheelEvent
width
widthMM
winId
window
windowFilePath
windowFlags
windowHandle
windowIcon
windowIconText
windowModality
windowOpacity
windowRole
windowState
windowTitle
windowType
x
y

Attributes

ClearToDefault
ClearToNull
DrawChildren
DrawWindowBackground
IgnoreMask
LeadingPosition
NoEcho
Normal
Password
PasswordEchoOnEdit
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
TrailingPosition
attributeIndexChanged Emitted when the field associated with the widget changes.
cleared Emitted when the widget is cleared
cursorPositionChanged cursorPositionChanged(self, int, int) [signal]
customContextMenuRequested customContextMenuRequested(self, QPoint) [signal]
destroyed destroyed(self, QObject = None) [signal]
editingFinished editingFinished(self) [signal]
layerChanged Emitted when the layer associated with the widget changes.
objectNameChanged objectNameChanged(self, str) [signal]
returnPressed returnPressed(self) [signal]
selectOnFocusChanged Will select all text when this widget receives the focus.
selectionChanged selectionChanged(self) [signal]
showSpinnerChanged Show a spinner icon.
staticMetaObject
textChanged textChanged(self, str) [signal]
textEdited textEdited(self, str) [signal]
valueChanged Same as textChanged() but with support for null values.
windowIconChanged windowIconChanged(self, QIcon) [signal]
windowIconTextChanged windowIconTextChanged(self, str) [signal]
windowTitleChanged windowTitleChanged(self, str) [signal]
actionEvent()
attributeIndex(self) → int

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

See also

layer()

attributeIndexChanged

Emitted when the field associated with the widget changes.

Parameters:index – new attribute index for field [signal]
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(self) → QgsVectorLayer

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

See also

setLayer()

See also

attributeIndex()

layerChanged

Emitted when the layer associated with the widget changes.

Parameters:layer – vector layer [signal]
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setAttributeIndex(self, index: int)

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

Parameters:index – 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 – vector layer

See also

layer()

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()