code: def leaveEvent(self, event):
          
          super(XViewPanelItem, self).leaveEvent(event)
  
          # store the hover state and mark for a repaint
          self._hovered = False
          self.update()
docs: Mark the hovered state as being false.
  
          :param      event | <QtCore.QLeaveEvent>