Class: QgsCurrencyNumericFormat

A numeric formatter which returns a text representation of a currency value.

Added in version 3.12.

Class Hierarchy

Inheritance diagram of qgis.core.QgsCurrencyNumericFormat

Base classes

QgsBasicNumericFormat

A numeric formatter which returns a simple text representation of a value.

QgsNumericFormat

Abstract base class for numeric formatters, which allow for formatting a numeric value for display.

Methods

prefix

Returns the currency prefix, e.g. "$".

setPrefix

Sets the currency prefix, e.g. "$".

setSuffix

Sets the currency suffix, e.g. "AUD".

suffix

Returns the currency suffix, e.g. "AUD".

class qgis.core.QgsCurrencyNumericFormat[source]

Bases: QgsBasicNumericFormat

__init__()

Default constructor

__init__(a0: QgsCurrencyNumericFormat)
Parameters:

a0 (QgsCurrencyNumericFormat)

prefix(self) str[source]

Returns the currency prefix, e.g. “$”.

See also

setPrefix()

Return type:

str

setPrefix(self, prefix: str | None)[source]

Sets the currency prefix, e.g. “$”.

See also

prefix()

Parameters:

prefix (Optional[str])

setSuffix(self, suffix: str | None)[source]

Sets the currency suffix, e.g. “AUD”.

See also

suffix()

Parameters:

suffix (Optional[str])

suffix(self) str[source]

Returns the currency suffix, e.g. “AUD”.

See also

setSuffix()

Return type:

str