def setHoverIcon(self, icon): """ Sets the icon that will be used when this hotspot is hovered. :param icon | <QIcon> || None """ icon = QIcon(icon) if not icon.isNull(): self._hoverIcon = QIcon(icon) else: self._hoverIcon = None
def setIcon(self, icon): """ Sets the icon for this hotspot. If this method is called with a valid icon, then the style will automatically switch to Icon, otherwise, the style will be set to Invisible. :param icon | <QIcon> || <str> || None """ icon = QIcon(icon) if icon.isNull(): self._icon = None self._style = XNodeHotspot.Style.Invisible else: self._icon = icon self._style = XNodeHotspot.Style.Icon