Class: QgsCodedValue

class qgis.core.QgsCodedValue

Bases: sip.wrapper

Associates a code and a value.

New in version 3.26.

QgsCodedValue(code: Any, value: str) Constructor for QgsCodedValue, with the associated code and value.

The code is the underlying value stored in feature attributes, while the value is the user-facing string representation.

QgsCodedValue(QgsCodedValue)

Methods

code

Returns the associated code, which is the underlying value stored in fields.

value

Returns the associated value, which is the user-friendly string representation.

code(self) Any

Returns the associated code, which is the underlying value stored in fields.

Return type:

Any

value(self) str

Returns the associated value, which is the user-friendly string representation.

Return type:

str