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(format_string, **kwargs)

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

Reactive Computed Float Model

Parameters

format_string (str) –

__init__(format_string, **kwargs)

Constructor

Parameters
  • format_string (str) – python formatting string

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

_format_text(**kwargs)

Get value of the model in string format

Parameters

**kwargs – arguments to inject in the string

Returns

formatted string with current model values

Return type

str

get()

Get the computed text

Return type

str

_text: str

Model store variable