Mixin class for handling widget containers and gui_id
All container widgets (BECFigure
and the ones in preparation BECDockArea
and BECDock
) could benefit from generalised functions from BECFigure
:
def _generate_unique_widget_id(self):
"""Generate a unique widget ID."""
existing_ids = set(self._widgets.keys())
for i in itertools.count(1):
widget_id = f"widget_{i}"
if widget_id not in existing_ids:
return widget_id
Edited by wyzula_j