def set_icon(self, icon, sh_guard=True):
        if icon:
            qicon = get_cached_qicon(icon)
        else:
            qicon = QIcon()
        if sh_guard:
            with size_hint_guard(self):
                self.widget.setIcon(qicon)
        else:
            self.widget.setIcon(qicon)
Set the icon on the widget.
dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/qt/qt_abstract_button.py/QtAbstractButton.set_icon