Class: QgsAttributeFormEditorWidget

class qgis.gui.QgsAttributeFormEditorWidget(editorWidget: QgsEditorWidgetWrapper, widgetType: str, form: QgsAttributeForm)

Bases: QgsAttributeFormWidget

Constructor for QgsAttributeFormEditorWidget.

Parameters
  • editorWidget (QgsEditorWidgetWrapper) – associated editor widget wrapper (for default/edit modes)

  • widgetType (str) – the type identifier of the widget passed in the wrapper

  • form (QgsAttributeForm) – parent attribute form

A widget consisting of both an editor widget and additional widgets for controlling the behavior of the editor widget depending on a number of possible modes. For instance, if the parent attribute form is in the multi edit mode, this widget will show both the editor widget and a tool button for controlling the multi edit results.

Methods

actionEvent

changeEvent

changesCommitted

Called when field values have been committed;

childEvent

closeEvent

connectNotify

contextMenuEvent

create

createSearchWidgetWrappers

param context

currentValue

Returns the current value of the attached editor widget.

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

editorWidget

Returns the editor widget wrapper

enterEvent

event

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hasChanged

Returns True if the widget’s value has been changed since it was initialized.

hideEvent

initPainter

initialize

Resets the widget to an initial value.

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

leaveEvent

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

receivers

resizeEvent

sender

senderSignalIndex

setConstraintResultVisible

Set the constraint result label visible or invisible according to the layer editable status

setConstraintStatus

Set the constraint status for this widget.

setIsMixed

Sets whether the widget should be displayed in a “mixed values” mode.

sharedPainter

showEvent

tabletEvent

timerEvent

updateMicroFocus

wheelEvent

Signals

valueChanged

Emitted when the widget’s value changes

valuesChanged

Emitted when the widget’s value changes

actionEvent()
changeEvent()
changesCommitted(self)

Called when field values have been committed;

childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
createSearchWidgetWrappers(self, context: QgsAttributeEditorContext = QgsAttributeEditorContext())
Parameters

context (QgsAttributeEditorContext = QgsAttributeEditorContext()) –

currentValue(self) → Any

Returns the current value of the attached editor widget.

Return type

Any

customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
editorWidget(self) → QgsEditorWidgetWrapper

Returns the editor widget wrapper

New in version 3.10.

Return type

QgsEditorWidgetWrapper

enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hasChanged(self) → bool

Returns True if the widget’s value has been changed since it was initialized.

See also

initialize()

Return type

bool

hideEvent()
initPainter()
initialize(self, initialValue: Any, mixedValues: bool = False, additionalFieldValues: Iterable[Any] = [])

Resets the widget to an initial value.

Parameters
  • initialValue (Any) – initial value to show in widget

  • mixedValues (bool = False) – set to True to initially show the mixed values state

  • additionalFieldValues (Iterable[Any] = []) – a variant map of additional field names with their corresponding values

inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setConstraintResultVisible(self, editable: bool)

Set the constraint result label visible or invisible according to the layer editable status

Parameters

editable (bool) –

setConstraintStatus(self, constraint: str, description: str, err: str, result: QgsEditorWidgetWrapper.ConstraintResult)

Set the constraint status for this widget.

Parameters
setIsMixed(self, mixed: bool)

Sets whether the widget should be displayed in a “mixed values” mode.

Parameters

mixed (bool) – set to True to show in a mixed values state

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
valueChanged

Emitted when the widget’s value changes

Parameters

value (Any) – new widget value

Deprecated since version QGIS: 3.10 use valuesChanged instead [signal]

valuesChanged

Emitted when the widget’s value changes

Parameters
  • value (Any) – new widget value

  • additionalFieldValues (Iterable[Any]) – of the potential additional fields

New in version 3.10: [signal]

wheelEvent()