QUndoView

The QUndoView class displays the contents of a QUndoStack . More

Inheritance diagram of PySide2.QtWidgets.QUndoView

Synopsis

Functions

Slots

Detailed Description

QUndoView is a QListView which displays the list of commands pushed on an undo stack. The most recently executed command is always selected. Selecting a different command results in a call to setIndex() , rolling the state of the document backwards or forward to the new command.

The stack can be set explicitly with setStack() . Alternatively, a QUndoGroup object can be set with setGroup() . The view will then update itself automatically whenever the active stack of the group changes.

../../_images/qundoview.png
class QUndoView(group[, parent=None])

QUndoView(stack[, parent=None])

QUndoView([parent=None])

param parent

QWidget

param group

QUndoGroup

param stack

QUndoStack

Constructs a new view with parent parent and sets the observed group to group .

The view will update itself autmiatically whenever the active stack of the group changes.

Constructs a new view with parent parent and sets the observed stack to stack .

Constructs a new view with parent parent .

PySide2.QtWidgets.QUndoView.cleanIcon()
Return type

QIcon

See also

setCleanIcon()

PySide2.QtWidgets.QUndoView.emptyLabel()
Return type

unicode

See also

setEmptyLabel()

PySide2.QtWidgets.QUndoView.group()
Return type

QUndoGroup

Returns the group displayed by this view.

If the view is not looking at group, this function returns None .

PySide2.QtWidgets.QUndoView.setCleanIcon(icon)
Parameters

iconQIcon

See also

cleanIcon()

PySide2.QtWidgets.QUndoView.setEmptyLabel(label)
Parameters

label – unicode

See also

emptyLabel()

PySide2.QtWidgets.QUndoView.setGroup(group)
Parameters

groupQUndoGroup

Sets the group displayed by this view to group . If group is 0, the view will be empty.

The view will update itself autmiatically whenever the active stack of the group changes.

See also

group() setStack()

PySide2.QtWidgets.QUndoView.setStack(stack)
Parameters

stackQUndoStack

Sets the stack displayed by this view to stack . If stack is 0, the view will be empty.

If the view was previously looking at a QUndoGroup , the group is set to None .

See also

stack() setGroup()

PySide2.QtWidgets.QUndoView.stack()
Return type

QUndoStack

Returns the stack currently displayed by this view. If the view is looking at a QUndoGroup , this the group’s active stack.