Skip to content

TextListFormat

Qt Base Class: QTextListFormat

Signature: QTextListFormat(self) -> None QTextListFormat(self, QTextListFormat: PySide6.QtGui.QTextListFormat) -> None QTextListFormat(self, fmt: PySide6.QtGui.QTextFormat) -> None

Base classes

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

⋔ Inheritance diagram

graph TD
  1473245666576["gui.TextListFormat"]
  1473245646080["gui.TextFormatMixin"]
  140713234304496["builtins.object"]
  1473299710592["QtGui.QTextListFormat"]
  1473299700832["QtGui.QTextFormat"]
  1473291690208["Shiboken.Object"]
  1473245646080 --> 1473245666576
  140713234304496 --> 1473245646080
  1473299710592 --> 1473245666576
  1473299700832 --> 1473299710592
  1473291690208 --> 1473299700832
  140713234304496 --> 1473291690208

🛈 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))