Class: QgsMultiEditToolButton

A tool button widget which is displayed next to editor widgets in attribute forms, and allows for controlling how the widget behaves and interacts with the form while in multi edit mode.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsMultiEditToolButton

Base classes

QToolButton

QAbstractButton

QWidget

QObject

QPaintDevice

Methods

changesCommitted

Called when field values have been changed and field now contains all the same values.

resetChanges

Resets the changed state for the field.

setField

Sets the field associated with this button.

setIsChanged

Sets whether the associated field has changed.

setIsMixed

Sets whether the associated field contains mixed values.

state

Returns the current displayed state of the button.

Signals

resetFieldValueTriggered

Emitted when the "reset to original values" option is selected.

setFieldValueTriggered

Emitted when the "set field value for all features" option is selected.

Attributes

Changed

Default

MixedValues

class qgis.gui.QgsMultiEditToolButton[source]

Bases: QToolButton

__init__(parent: QWidget | None = None)

Constructor for QgsMultiEditToolButton.

Parameters:

parent (Optional[QWidget] = None) – parent object

Changed = 2
Default = 0
MixedValues = 1
class State

Bases: int

changesCommitted(self)[source]

Called when field values have been changed and field now contains all the same values.

See also

resetChanges()

resetChanges(self)[source]

Resets the changed state for the field.

See also

setIsMixed()

See also

setIsChanged()

signal resetFieldValueTriggered[source]

Emitted when the “reset to original values” option is selected.

setField(self, field: QgsField)[source]

Sets the field associated with this button. This is used to customize the widget menu and tooltips to match the field properties.

Parameters:

field (QgsField) – associated field

signal setFieldValueTriggered[source]

Emitted when the “set field value for all features” option is selected.

setIsChanged(self, changed: bool)[source]

Sets whether the associated field has changed.

Parameters:

changed (bool) – whether field has changed

See also

setIsMixed()

See also

resetChanges()

setIsMixed(self, mixed: bool)[source]

Sets whether the associated field contains mixed values.

Parameters:

mixed (bool) – whether field values are mixed

See also

setIsChanged()

See also

resetChanges()

state(self) QgsMultiEditToolButton.State[source]

Returns the current displayed state of the button.

Return type:

QgsMultiEditToolButton.State