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: QWidget | None = None, **kwargs: Any)[source]

Bases: 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: QModelIndex) None[source]

Set the root index

rootIndex() QModelIndex[source]

Return the root index.

view() QTreeView[source]

Return the QTreeView instance used.

setActionRole(role: 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: QObject | None, a1: QEvent | None) bool[source]