Skip to content

LogRecordModel

Qt Base Class: QAbstractTableModel

Signature: QAbstractTableModel(self, parent: Optional[PySide6.QtCore.QObject] = None) -> None

Base classes

Name Children Inherits
ColumnTableModel
prettyqt.itemmodels.columnitemmodel

⋔ Inheritance diagram

graph TD
  1473245479184["itemmodels.LogRecordModel"]
  1473245684144["itemmodels.ColumnTableModel"]
  1473245682192["itemmodels.ColumnItemModelMixin"]
  140713234304496["builtins.object"]
  1473299901888["core.AbstractTableModel"]
  1473299900912["core.AbstractTableModelMixin"]
  1473299890176["core.AbstractItemModelMixin"]
  1473299815024["core.ObjectMixin"]
  1473289054032["QtCore.QAbstractTableModel"]
  1473289050128["QtCore.QAbstractItemModel"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473245684144 --> 1473245479184
  1473245682192 --> 1473245684144
  140713234304496 --> 1473245682192
  1473299901888 --> 1473245684144
  1473299900912 --> 1473299901888
  1473299890176 --> 1473299900912
  1473299815024 --> 1473299890176
  140713234304496 --> 1473299815024
  1473289054032 --> 1473299901888
  1473289050128 --> 1473289054032
  1473288842240 --> 1473289050128
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: ColumnTableModel

Model to display a list of logging.LogRecords.

Source code in prettyqt\itemmodels\logrecordmodel.py
class LogRecordModel(itemmodels.ColumnTableModel):
    """Model to display a list of logging.LogRecords."""

    COLUMNS = [
        LevelNameColumn,
        FileNameColumn,
        FunctionNameColumn,
        LineNoColumn,
        MessageColumn,
        ModuleColumn,
        CreatedColumn,
        ProcessColumn,
        ThreadColumn,
        ProcessNameColumn,
        ThreadNameColumn,
        RelativeCreatedColumn,
        NameColumn,
        PathNameColumn,
    ]
    SUPPORTS = Sequence[logging.LogRecord]

    def __init__(self, **kwargs):
        super().__init__(items=[], columns=self.COLUMNS, **kwargs)

    @classmethod
    def supports(cls, instance) -> bool:
        match instance:
            case (logging.LogRecord(), *_):
                return True
            case _:
                return False

Info

Supported data type: collections.abc.Sequence[logging.LogRecord]

⌗ Property table

Qt Property Type Doc
objectName QString