'This function creates a set of checkable buttons and connects them so that only one
may be checked at a time.'

def state_buttons(self, orientation, buttons, widget, nomargin=False):

    c = StateButtonContainer(self, orientation, buttons, widget, nomargin)
    if (widget.layout() is not None):
        widget.layout().addWidget(c)
    return c
