edifice.Label

edifice.Label#

class edifice.Label(text='', selectable=False, editable=False, word_wrap=True, link_open=False, **kwargs)[source]#

Bases: QtWidgetElement

Basic widget for displaying text.

../_images/label.png

You can render rich text with the Qt supported HTML subset.

Parameters:
  • text (Any) – the text to display. Can be any Python type; the text prop is converted to a string using str before being displayed

  • word_wrap (bool) – enable/disable word wrapping.

  • link_open (bool) – whether hyperlinks will open to the operating system. Defaults to False. PySide6.QtWidgets.PySide6.QtWidgets.QLabel.setOpenExternalLinks

  • selectable (bool) – whether the content of the label can be selected. Defaults to False.

  • editable (bool) – whether the content of the label can be edited. Defaults to False.

Methods

__init__([text, selectable, editable, ...])

register_ref(reference)

Registers provided Reference to this Element.

set_key(key)

Sets the key of the Element.

Attributes

children

The children of this Element.

props

The props of this Element.

underlying

The underlying QWidget, which may not exist if this Element has not rendered.