内容表

上一话题

QUndoStack

下一话题

QVBoxLayout

QUndoView

QUndoView class displays the contents of a QUndoStack . 更多

Inheritance diagram of PySide2.QtWidgets.QUndoView

概要

函数

详细描述

QUndoView QListView ,显示被压入撤消堆栈的命令列表。始终选择最近执行的命令。选择不同的命令导致调用 setIndex() , rolling the state of the document backwards or forward to the new command.

堆栈可以被明确设置采用 setStack() . Alternatively, a QUndoGroup 对象可以被设置采用 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

构造新视图采用父级 parent and sets the observed group to group .

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

构造新视图采用父级 parent and sets the observed stack to stack .

构造新视图采用父级 parent .

PySide2.QtWidgets.QUndoView. cleanIcon ( )
返回类型

QIcon

另请参阅

setCleanIcon()

PySide2.QtWidgets.QUndoView. emptyLabel ( )
返回类型

unicode

另请参阅

setEmptyLabel()

PySide2.QtWidgets.QUndoView. group ( )
返回类型

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 )
参数

icon QIcon

另请参阅

cleanIcon()

PySide2.QtWidgets.QUndoView. setEmptyLabel ( label )
参数

label – unicode

另请参阅

emptyLabel()

PySide2.QtWidgets.QUndoView. setGroup ( group )
参数

group QUndoGroup

Sets the group displayed by this view to group 。若 group is None , the view will be empty.

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

PySide2.QtWidgets.QUndoView. setStack ( stack )
参数

stack QUndoStack

Sets the stack displayed by this view to stack 。若 stack is None , the view will be empty.

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

PySide2.QtWidgets.QUndoView. stack ( )
返回类型

QUndoStack

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