Class: QgsNumericFormatSelectorWidget

A widget which allows choice of numeric formats and the properties of them.

Added in version 3.12.

QgsNumericFormatSelectorWidget

QgsNumericFormatSelectorWidget

Class Hierarchy

Inheritance diagram of qgis.gui.QgsNumericFormatSelectorWidget

Base classes

QgsPanelWidget

Base class for any widget that can be shown as a inline panel

QWidget

QObject

QPaintDevice

Methods

format

Returns a new format object representing the settings currently configured in the widget.

registerExpressionContextGenerator

Register an expression context generator class that will be used to retrieve an expression context for the widget when required.

setFormat

Sets the format to show in the widget.

Signals

changed

Emitted whenever the format configured55 in the widget is changed.

class qgis.gui.QgsNumericFormatSelectorWidget[source]

Bases: QgsPanelWidget

__init__(parent: QWidget | None = None)

Constructor for QgsNumericFormatSelectorWidget with the specified parent widget.

Parameters:

parent (Optional[QWidget] = None)

signal changed[source]

Emitted whenever the format configured55 in the widget is changed.

format(self) QgsNumericFormat | None[source]

Returns a new format object representing the settings currently configured in the widget.

The caller takes ownership of the returned object.

Return type:

Optional[QgsNumericFormat]

registerExpressionContextGenerator(self, generator: QgsExpressionContextGenerator | None)[source]

Register an expression context generator class that will be used to retrieve an expression context for the widget when required.

Ownership is not transferred, and the generator must exist for the lifetime of this widget.

Added in version 3.40.

Parameters:

generator (Optional[QgsExpressionContextGenerator])

setFormat(self, format: QgsNumericFormat | None)[source]

Sets the format to show in the widget.

Parameters:

format (Optional[QgsNumericFormat])