Tool Tree Widget (tooltree)

Tool Tree

A ToolTree widget presenting the user with a set of actions organized in a tree structure.

class orangecanvas.gui.tooltree.ToolTree(parent: Optional[PyQt5.QtWidgets.QWidget] = None, **kwargs: Any)[source]

Bases: PyQt5.QtWidgets.QWidget

A ListView like presentation of a list of actions.

triggered(QAction)

Signal emitted when an action in the widget is triggered.

hovered(QAction)

Signal emitted when an action in the widget is hovered.

setFlattened(flatten: bool) None[source]

Show the actions in a flattened view.

flattened() bool[source]

Are actions shown in a flattened tree (a list).

setRootIndex(index: PyQt5.QtCore.QModelIndex) None[source]

Set the root index

rootIndex() PyQt5.QtCore.QModelIndex[source]

Return the root index.

view() PyQt5.QtWidgets.QTreeView[source]

Return the QTreeView instance used.

setActionRole(role: PyQt5.QtCore.Qt.ItemDataRole) None[source]

Set the action role. By default this is Qt.UserRole

ensureCurrent() None[source]

Ensure the view has a current item if one is available.

eventFilter(self, a0: Optional[QObject], a1: Optional[QEvent]) bool[source]