def METHOD_NAME(self, state):
    """Restores the state of the custom widgets."""
    for group, title, status in state:
        for btn, act, widget, grp in self.otherWidgets:
            # Strip '&' from both title and btn.text() to improve matching because
            #   title contains "&" shortcut character whereas btn.text() does not.
            if group == grp and title.replace('&', '') == btn.text().replace('&', ''):
                btn.setChecked(status)
                btn.defaultAction().setChecked(status)
                widget.setVisible(status)