RQText

class pyreaqtive.models.rqtext.RQText(text)

Bases: pyreaqtive.models.rqmodel.RQModel

Reactive Text Model

Represents a string of text

Parameters

text (str) –

__init__(text)

Constructor

Parameters

text (str) – Initial value of the model

_text: str

Model store variable

get()

Get value of the model

Returns

value of the model

Return type

str

set(value)

Will propagate the change to the widgets linked to the model

Parameters

value (str) – new value of the model

Return type

None

__str__()

Get value of the model in string format

Returns

value of the model

Return type

str

class pyreaqtive.models.rqtext.RQComputedText(function, **kwargs)

Bases: pyreaqtive.models.rqmodel.RQComputedModel, pyreaqtive.models.rqtext.RQText

Reactive Computed Float Model

Parameters

function (Union[str, Callable[..., str]]) –

__init__(function, **kwargs)

Constructor

Parameters
  • function (Union[str, Callable[..., str]]) – function or python formatting string

  • **kwargs – reactive models in the function by variable name as keyword Changes in these models will trigger recalculation of the function

get()

Get the computed text

Return type

str

_text: str

Model store variable