Subgroup: Feature

Class: QgsFeatureListComboBox

class qgis.gui.QgsFeatureListComboBox

Bases: PyQt5.QtWidgets.QComboBox

This offers a combobox with autocompleter that allows selecting features from a layer.

It will show up to 100 entries at a time. The entries can be chosen based on the displayExpression and whenever text is typed into the combobox, the completer and popup will adjust to features matching the typed text.

New in version 3.0: Methods

acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction
addActions
addItem addItem(self, QIcon, str, userData: Any = None)
addItems
adjustSize
allowNull Determines if a NULL value should be available in the list.
autoFillBackground
backgroundRole
baseSize
blockSignals
changeEvent
childAt childAt(self, int, int) -> QWidget
childEvent
children
childrenRect
childrenRegion
clear
clearEditText
clearFocus
clearMask
close
closeEvent
colorCount
completer
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
count
create
createWindowContainer
currentData
currentFeatureRequest Shorthand for getting a feature request to query the currently selected feature.
currentIndex
currentModelIndex The index of the currently selected item.
currentText
cursor
customEvent
deleteLater
depth
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
disconnect
disconnectNotify
displayExpression The display expression will be used to display features as well as the the value to match the typed text against.
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
duplicatesEnabled
dynamicPropertyNames
effectiveWinId
ensurePolished
enterEvent
event
eventFilter
filterExpression An additional expression to further restrict the available features.
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]
findData
findText
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPolicy
focusPreviousChild
focusProxy
focusWidget
font
fontInfo
fontMetrics
foregroundRole
frameGeometry
frameSize
geometry
getContentsMargins
grab
grabGesture
grabKeyboard
grabMouse grabMouse(self, Union[QCursor, Qt.CursorShape])
grabShortcut
graphicsEffect
graphicsProxyWidget
hasFocus
hasFrame
hasHeightForWidth
hasMouseTracking
hasTabletTracking
height
heightForWidth
heightMM
hide
hideEvent
hidePopup
iconSize
identifierField Field name that will be used to uniquely identify the current feature.
identifierValue The identifier value of the currently selected feature.
inherits
initPainter
initStyleOption
inputMethodEvent
inputMethodHints
inputMethodQuery inputMethodQuery(self, Qt.InputMethodQuery, Any) -> Any
insertAction
insertActions
insertItem insertItem(self, int, QIcon, str, userData: Any = None)
insertItems
insertPolicy
insertSeparator
installEventFilter
isActiveWindow
isAncestorOf
isEditable
isEnabled
isEnabledTo
isFullScreen
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isRightToLeft
isSignalConnected
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
itemData
itemDelegate
itemIcon
itemText
keyPressEvent
keyReleaseEvent
keyboardGrabber
killTimer
layout
layoutDirection
leaveEvent
lineEdit
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
maxCount
maxVisibleItems
maximumHeight
maximumSize
maximumWidth
metaObject
metric
minimumContentsLength
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
model
modelColumn
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move move(self, int, int)
moveEvent
moveToThread
nativeEvent
nativeParentWidget
nextInFocusChain
normalGeometry
objectName
overrideWindowFlags
overrideWindowState
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
physicalDpiX
physicalDpiY
pos
previousInFocusChain
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
raise_
receivers
rect
releaseKeyboard
releaseMouse
releaseShortcut
removeAction
removeEventFilter
removeItem
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
rootModelIndex
saveGeometry
scroll scroll(self, int, int, QRect)
sender
senderSignalIndex
setAcceptDrops
setAccessibleDescription
setAccessibleName
setAllowNull Determines if a NULL value should be available in the list.
setAttribute
setAutoFillBackground
setBackgroundRole
setBaseSize setBaseSize(self, QSize)
setCompleter
setContentsMargins setContentsMargins(self, QMargins)
setContextMenuPolicy
setCurrentIndex
setCurrentText
setCursor
setDisabled
setDisplayExpression The display expression will be used to display features as well as the the value to match the typed text against.
setDuplicatesEnabled
setEditText
setEditable
setEnabled
setFilterExpression An additional expression to further restrict the available features.
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
setIconSize
setIdentifierField Field name that will be used to uniquely identify the current feature.
setIdentifierValue The identifier value of the currently selected feature.
setInputMethodHints
setInsertPolicy
setItemData
setItemDelegate
setItemIcon
setItemText
setLayout
setLayoutDirection
setLineEdit
setLocale
setMask setMask(self, QRegion)
setMaxCount
setMaxVisibleItems
setMaximumHeight
setMaximumSize setMaximumSize(self, QSize)
setMaximumWidth
setMinimumContentsLength
setMinimumHeight
setMinimumSize setMinimumSize(self, QSize)
setMinimumWidth
setModel
setModelColumn
setMouseTracking
setObjectName
setPalette
setParent setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])
setProperty
setRootModelIndex
setShortcutAutoRepeat
setShortcutEnabled
setSizeAdjustPolicy
setSizeIncrement setSizeIncrement(self, QSize)
setSizePolicy setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)
setSourceLayer The layer from which features should be listed.
setStatusTip
setStyle
setStyleSheet
setTabOrder
setTabletTracking
setToolTip
setToolTipDuration
setUpdatesEnabled
setValidator
setView
setVisible
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
sharedPainter
show
showEvent
showFullScreen
showMaximized
showMinimized
showNormal
showPopup
signalsBlocked
size
sizeAdjustPolicy
sizeHint
sizeIncrement
sizePolicy
sourceLayer The layer from which features should be listed.
stackUnder
startTimer
statusTip
style
styleSheet
tabletEvent
testAttribute
thread
timerEvent
toolTip
toolTipDuration
tr
underMouse
ungrabGesture
unsetCursor
unsetLayoutDirection
unsetLocale
update update(self, QRect)
updateGeometry
updateMicroFocus
updatesEnabled
validator
view
visibleRegion
whatsThis
wheelEvent
width
widthMM
winId
window
windowFilePath
windowFlags
windowHandle
windowIcon
windowIconText
windowModality
windowOpacity
windowRole
windowState
windowTitle
windowType
x
y

Attributes

AdjustToContents
AdjustToContentsOnFirstShow
AdjustToMinimumContentsLength
AdjustToMinimumContentsLengthWithIcon
DrawChildren
DrawWindowBackground
IgnoreMask
InsertAfterCurrent
InsertAlphabetically
InsertAtBottom
InsertAtCurrent
InsertAtTop
InsertBeforeCurrent
NoInsert
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
activated activated(self, int) [signal]
allowNullChanged Determines if a NULL value should be available in the list.
currentIndexChanged currentIndexChanged(self, int) [signal]
currentTextChanged currentTextChanged(self, str) [signal]
customContextMenuRequested customContextMenuRequested(self, QPoint) [signal]
destroyed destroyed(self, QObject = None) [signal]
displayExpressionChanged The display expression will be used to display features as well as the the value to match the typed text against.
editTextChanged editTextChanged(self, str) [signal]
filterExpressionChanged An additional expression to further restrict the available features.
highlighted highlighted(self, int) [signal]
identifierFieldChanged Field name that will be used to uniquely identify the current feature.
identifierValueChanged The identifier value of the currently selected feature.
objectNameChanged objectNameChanged(self, str) [signal]
sourceLayerChanged The layer from which features should be listed.
staticMetaObject
windowIconChanged windowIconChanged(self, QIcon) [signal]
windowIconTextChanged windowIconTextChanged(self, str) [signal]
windowTitleChanged windowTitleChanged(self, str) [signal]
actionEvent()
allowNull(self) → bool

Determines if a NULL value should be available in the list.

allowNullChanged

Determines if a NULL value should be available in the list. [signal]

changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
currentFeatureRequest(self) → QgsFeatureRequest

Shorthand for getting a feature request to query the currently selected feature.

currentModelIndex(self) → QModelIndex

The index of the currently selected item.

customEvent()
destroy()
disconnectNotify()
displayExpression(self) → str

The display expression will be used to display features as well as the the value to match the typed text against.

displayExpressionChanged

The display expression will be used to display features as well as the the value to match the typed text against. [signal]

dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
filterExpression(self) → str

An additional expression to further restrict the available features. This can be used to integrate additional spatial or other constraints.

filterExpressionChanged

An additional expression to further restrict the available features. This can be used to integrate additional spatial or other constraints. [signal]

focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent(self, event: QFocusEvent)
focusPreviousChild()
hideEvent()
identifierField(self) → str

Field name that will be used to uniquely identify the current feature. Normally the primary key of the layer.

identifierFieldChanged

Field name that will be used to uniquely identify the current feature. Normally the primary key of the layer. [signal]

identifierValue(self) → Any

The identifier value of the currently selected feature. A value from the identifierField.

identifierValueChanged

The identifier value of the currently selected feature. A value from the identifierField. [signal]

initPainter()
initStyleOption()
inputMethodEvent()
isSignalConnected()
keyPressEvent(self, event: QKeyEvent)
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setAllowNull(self, allowNull: bool)

Determines if a NULL value should be available in the list.

setDisplayExpression(self, displayExpression: str)

The display expression will be used to display features as well as the the value to match the typed text against.

setFilterExpression(self, filterExpression: str)

An additional expression to further restrict the available features. This can be used to integrate additional spatial or other constraints.

TODO!

setIdentifierField(self, identifierField: str)

Field name that will be used to uniquely identify the current feature. Normally the primary key of the layer.

setIdentifierValue(self, identifierValue: Any)

The identifier value of the currently selected feature. A value from the identifierField.

setSourceLayer(self, sourceLayer: QgsVectorLayer)

The layer from which features should be listed.

sharedPainter()
showEvent()
sourceLayer(self) → QgsVectorLayer

The layer from which features should be listed.

sourceLayerChanged

The layer from which features should be listed. [signal]

tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()