

def set_icon(self, icon, sh_guard=True):
    ' Set the icon on the widget.\n\n        '
    if icon:
        qicon = get_cached_qicon(icon)
    else:
        qicon = QIcon()
    if icon:
        with size_hint_guard(self):
            self.widget.setIcon(qicon)
    else:
        self.widget.setIcon(qicon)

dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/qt/qt_abstract_button.py QtAbstractButton.set_icon/VarMisuse@43/73 `sh_guard`->`icon`