code: def __set_opacity(self):
          
  
          if self.__vector > 0:
              if self.isHidden():
                  self.show()
              if self.opacity <= self.__target_opacity:
                  self.opacity += self.__vector
              else:
                  self.__timer.stop()
                  self.faded_in.emit()
                  self.__duration and QTimer.singleShot(self.__duration, self.__fade_out)
          elif self.__vector < 0:
              if self.opacity > 0:
                  self.opacity += self.__vector
              else:
                  self.__timer.stop()
                  self.faded_out.emit()
                  self.hide()
docs: Sets the Widget opacity.