add_toggle#

CommonWindowUtils.add_toggle(layout, height=40, width=None, label=None, font_size=12)[source]#

Add a label and a toggle button to a specified layout.

Parameters:
layout: QLayout

Layout object to add the label and toggle button to.

height: int, optional

Height of the label and toggle. Default is 40.

width: list, optional

Width of the label and toggle. Default is [50, 100, 50] if None.

label: list of str, optional

Label text. Default is [‘label1’, ‘label2’] if None.

font_size: int, optional

Font size for the label text. Default is 12.

Returns:
tuple

A tuple containing the layout row, label object, toggle object, and second label object