Class: QgsFeatureSelectionDlg

A dialog for selecting features from a vector layer.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsFeatureSelectionDlg

Base classes

QDialog

QWidget

QObject

QPaintDevice

Methods

selectedFeatures

Gets the selected features

setFilterExpression

Set form filter expression

setSelectedFeatures

Set the selected features

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsFeatureSelectionDlg. See the FAQ for more details.

showEvent

Make sure the dialog does not grow too much

class qgis.gui.QgsFeatureSelectionDlg[source]

Bases: QDialog

__init__(vl: QgsVectorLayer | None, context: QgsAttributeEditorContext, parent: QWidget | None = None)

Constructor for QgsFeatureSelectionDlg

Parameters:
selectedFeatures(self) Any

Gets the selected features

Return type:

Any

Returns:

The selected feature ids

setFilterExpression(self, filter: str | None, type: QgsAttributeForm.FilterType)[source]

Set form filter expression

Parameters:
setSelectedFeatures(self, ids: Any)[source]

Set the selected features

Parameters:

ids (Any) – The feature ids to select

virtual showEvent(self, event: QShowEvent | None)[source]

Make sure the dialog does not grow too much

Parameters:

event (Optional[QShowEvent])