QUndoView¶
The
QUndoView
class displays the contents of aQUndoStack
. More…
Synopsis¶
Functions¶
def
cleanIcon
()def
emptyLabel
()def
group
()def
setCleanIcon
(icon)def
setEmptyLabel
(label)def
stack
()
Detailed Description¶
QUndoView
is aQListView
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 tosetIndex()
, rolling the state of the document backwards or forward to the new command.The stack can be set explicitly with
setStack()
. Alternatively, aQUndoGroup
object can be set withsetGroup()
. The view will then update itself automatically whenever the active stack of the group changes.
-
class
QUndoView
(group[, parent=None])¶ QUndoView(stack[, parent=None])
QUndoView([parent=None])
- param parent
- param group
- param stack
Constructs a new view with parent
parent
and sets the observed group togroup
.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 tostack
.Constructs a new view with parent
parent
.
-
PySide2.QtWidgets.QUndoView.
cleanIcon
()¶ - Return type
QIcon
See also
-
PySide2.QtWidgets.QUndoView.
emptyLabel
()¶ - Return type
unicode
See also
-
PySide2.QtWidgets.QUndoView.
group
()¶ - Return type
Returns the group displayed by this view.
If the view is not looking at group, this function returns
None
.See also
-
PySide2.QtWidgets.QUndoView.
setCleanIcon
(icon)¶ - Parameters
icon –
QIcon
See also
-
PySide2.QtWidgets.QUndoView.
setEmptyLabel
(label)¶ - Parameters
label – unicode
See also
-
PySide2.QtWidgets.QUndoView.
setGroup
(group)¶ - Parameters
group –
QUndoGroup
Sets the group displayed by this view to
group
. Ifgroup
is 0, the view will be empty.The view will update itself autmiatically whenever the active stack of the group changes.
See also
-
PySide2.QtWidgets.QUndoView.
setStack
(stack)¶ - Parameters
stack –
QUndoStack
Sets the stack displayed by this view to
stack
. Ifstack
is 0, the view will be empty.If the view was previously looking at a
QUndoGroup
, the group is set to 0.See also
-
PySide2.QtWidgets.QUndoView.
stack
()¶ - Return type
Returns the stack currently displayed by this view. If the view is looking at a
QUndoGroup
, this the group’s active stack.See also
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.