schrodinger.application.models.gui.experimental_px.delegates.bool module

Boolean delegate with checkbox rendering and toggle-on-click.

class schrodinger.application.models.gui.experimental_px.delegates.bool.BoolDelegate(parent: PyQt6.QtCore.QObject | None = None, **kwargs)

Bases: DelegateBase

Delegate for boolean values with checkbox rendering.

Displays a panelx-styled checkbox with optional text label. Clicking the checkbox toggles the value via setData(index, bool, Qt.CheckStateRole). No inline editor — interaction is entirely through the checkbox.

The model should provide:

  • Qt.CheckStateRole: Qt.Checked or Qt.Unchecked

  • Qt.DisplayRole: optional text label shown to the right of the checkbox indicator

__init__(parent: PyQt6.QtCore.QObject | None = None, **kwargs)