edifice.Label#

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

Bases: QtWidgetElement[QLabel]

Basic widget for displaying text.

Render rich text with the Qt supported HTML subset.

../_images/label.png

Note

The combination of rich text and word_wrap can sometimes cause Qt Layout Issues.

Parameters:
  • text (str) – The text to display.

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

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

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

  • text_format (TextFormat) – The text format of the label. Defaults to QtCore.Qt.TextFormat.AutoText. See QtCore.Qt.TextFormat.

Methods

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

register_ref(reference)

Registers provided Reference to this Element.

set_key(key)

Set the key of an 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.