Class: QgsFeatureListComboBox¶
-
class
qgis.gui.
QgsFeatureListComboBox
(parent: QWidget = None)¶ Bases:
PyQt5.QtWidgets.QComboBox
Create a new QgsFeatureListComboBox, optionally specifying a
parent
.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: Enums
Methods
Determines if a NULL value should be available in the list.
Shorthand for getting a feature request to query the currently selected feature.
The index of the currently selected item.
The display expression will be used to display features as well as the value to match the typed text against.
An additional expression to further restrict the available features.
Field name that will be used to uniquely identify the current feature.
The identifier value of the currently selected feature.
Returns the current index of the NULL value, or -1 if NULL values are not allowed.
Determines if a NULL value should be available in the list.
The display expression will be used to display features as well as the value to match the typed text against.
An additional expression to further restrict the available features.
Field name that will be used to uniquely identify the current feature.
The identifier value of the currently selected feature.
The layer from which features should be listed.
The layer from which features should be listed.
Signals
Determines if a NULL value should be available in the list.
The display expression will be used to display features as well as the the value to match the typed text against.
An additional expression to further restrict the available features.
Field name that will be used to uniquely identify the current feature.
The identifier value of the currently selected feature.
The underlying model has been updated.
The layer from which features should be listed.
Attributes
-
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 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
()¶
-
modelUpdated
¶ The underlying model has been updated.
New in version 3.2: [signal]
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
nullIndex
(self) → int¶ Returns the current index of the NULL value, or -1 if NULL values are not allowed.
New in version 3.2.
-
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 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.
-
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
()¶
-