Skip to content

UndoCommand

Base classes

Name Children Inherits
QUndoCommand
PySide6.QtGui
QUndoCommand(self, text: str, /, parent: PySide6.QtGui.QUndoCommand | None \= None) -> None

⋔ Inheritance diagram

graph TD
  2529988180["gui.UndoCommand"]
  4008655870["QtGui.QUndoCommand"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  4008655870 --> 2529988180
  37984305 --> 4008655870
  2751680898 --> 37984305

🛈 DocStrings

Bases: QUndoCommand

Source code in prettyqt/gui/undocommand.py
class UndoCommand(QtGui.QUndoCommand):
    def __len__(self) -> int:
        return self.childCount()

    def __getitem__(self, index: int) -> QtGui.QUndoCommand:
        if index >= self.childCount():
            raise IndexError(index)
        return self.child(index)

:fa-brands-github: Show source on GitHub