code: def setIcon(self, icon):
          
          if icon:
              self._icon = QIcon(icon)
          else:
              self._icon = None
docs: Sets the icon for this item to the inputed icon.
          
          :param      icon | <str> || <QIcon> || None