Skip to content

ConfigGroupsTree

ConfigGroupsTreeConfigGroupsTree

Screenshot generated from the example below.

Example

examples/config_groups_tree.py
from pymmcore_plus import CMMCorePlus
from qtpy.QtCore import QModelIndex
from qtpy.QtWidgets import QApplication

from pymmcore_widgets import ConfigGroupsTree

app = QApplication([])

core = CMMCorePlus()
core.loadSystemConfiguration()

tree = ConfigGroupsTree.create_from_core(core)
tree.show()
tree.expandRecursively(QModelIndex())
tree.resize(600, 600)

app.exec()

API

Bases: QTreeView

A tree widget that displays configuration groups.

create_from_core classmethod

create_from_core(
    core: CMMCorePlus, parent: QWidget | None = None
) -> ConfigGroupsTree

Create a ConfigGroupsTree from a CMMCorePlus instance.

setUndoStack

setUndoStack(undo_stack: QUndoStack) -> None

Set the undo stack and configure undo-aware delegates.

setModel

setModel(model: QAbstractItemModel | None) -> None

Set the model for the tree view.