schrodinger.maestro_utils.surface_manager.delegates module¶
- class schrodinger.maestro_utils.surface_manager.delegates.ChildIndentDelegate(parent: QTreeView, default_indentation: int)¶
Bases:
NonSelectedItemHoverDelegateCustom delegate that renders child items without indentation while preserving parent row indentation. It does that by adjusting the left position of the item rectangle to the left by the default indentation for child items.
Uses the C++ NonSelectedItemHoverDelegate (wrapped via SIP) internally for hover behavior while this class only applies indentation adjustment.
- __init__(parent: QTreeView, default_indentation: int)¶
Constructor for ChildIndentDelegate. :param parent: The parent widget. :param default_indentation: The default indentation for items in the tree.
- paint(painter, option, index)¶
Paint the item with custom indentation adjustment for child items.