RQText

class pyreaqtive.models.rqtext.RQText(text: str)

Bases: pyreaqtive.models.rqmodel.RQModel

Reactive Text Model

Represents a string of text

__init__(text: str)

Constructor

Parameters

text – Initial value of the model

_text: str

Model store variable

get()str

Get value of the model

Returns

value of the model

Return type

str

set(value: str)None

Will propagate the change to the widgets linked to the model

Parameters

value – new value of the model

__str__()str

Get value of the model in string format

Returns

value of the model

Return type

str

class pyreaqtive.models.rqtext.RQComputedText(format_string: str, **kwargs)

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

Reactive Computed Float Model

__init__(format_string: str, **kwargs)

Constructor

Parameters
  • format_string – 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)str

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()str

Get the computed text

_text: str

Model store variable