Skip to content

TextListFormat

Base classes

Name Children Inherits
TextFormatMixin
prettyqt.gui.textformat
QTextListFormat
PySide6.QtGui
QTextListFormat(self, /) -> None

⋔ Inheritance diagram

graph TD
  1177212558["gui.TextListFormat"]
  1171567019["gui.TextFormatMixin"]
  2751680898["builtins.object"]
  2453885214["QtGui.QTextListFormat"]
  1757385971["QtGui.QTextFormat"]
  37984305["Shiboken.Object"]
  1171567019 --> 1177212558
  2751680898 --> 1171567019
  2453885214 --> 1177212558
  1757385971 --> 2453885214
  37984305 --> 1757385971
  2751680898 --> 37984305

🛈 DocStrings

Bases: TextFormatMixin, QTextListFormat

Source code in prettyqt/gui/textlistformat.py
class TextListFormat(gui.TextFormatMixin, gui.QTextListFormat):
    def set_style(self, style: StyleStr | gui.QTextListFormat.Style):
        """Set the style.

        Args:
            style: style
        """
        self.setStyle(STYLES.get_enum_value(style))

    def get_style(self) -> StyleStr:
        """Get current style.

        Returns:
            current style
        """
        return STYLES.inverse[self.style()]

get_style() -> StyleStr

Get current style.

Source code in prettyqt/gui/textlistformat.py
def get_style(self) -> StyleStr:
    """Get current style.

    Returns:
        current style
    """
    return STYLES.inverse[self.style()]

set_style(style: StyleStr | gui.QTextListFormat.Style)

Set the style.

Parameters:

Name Type Description Default
style StyleStr | Style

style

required
Source code in prettyqt/gui/textlistformat.py
def set_style(self, style: StyleStr | gui.QTextListFormat.Style):
    """Set the style.

    Args:
        style: style
    """
    self.setStyle(STYLES.get_enum_value(style))

:fa-brands-github: Show source on GitHub