def connect_bool_button(client, prop, widget):
    add_callback(client, prop, widget.setChecked)
    widget.toggled.connect(partial(setattr, client, prop))
Connect widget.setChecked and client.prop
dataset/ETHPy150Open glue-viz/glue/glue/utils/qt/widget_properties.py/connect_bool_button