docs: def qteMakeAppletActive(self, applet: (QtmacsApplet, str)):
          """
          Make ``applet`` visible and give it the focus.
  
          If ``applet`` is not yet visible it will replace the
          currently active applet, otherwise only the focus will shift.
  
          The ``applet`` parameter can either be an instance of
          ``QtmacsApplet`` or a string denoting an applet ID. In the
          latter case the ``qteGetAppletHandle`` method is used to fetch
          the respective applet instance.
  
          |Args|
  
          * ``applet`` (**QtmacsApplet**, **str**): the applet to activate.
  
          |Returns|
  
          * **bool**: whether or not an applet was activated.
  
          |Raises|
  
          * **QtmacsArgumentError** if at least one argument has an invalid type.
          """
          # If ``applet`` was specified by its ID (ie. a string) then
          # fetch the associated ``QtmacsApplet`` instance. If
          # ``applet`` is already an instance of ``QtmacsApplet`` then
          # use it directly.
          if isinstance(applet, str):
              appletObj = self.qteGetAppletHandle(applet)
          else:
              appletObj = applet
  
          # Sanity check: return if the applet does not exist.
          if appletObj not in self._qteAppletList:
              return False
  
          # If ``appletObj`` is a mini applet then double check that it
          # is actually installed and visible. If it is a conventional
          # applet then insert it into the layout.
          if self.qteIsMiniApplet(appletObj):
              if appletObj is not self._qteMiniApplet:
                  self.qteLogger.warning('Wrong mini applet. Not activated.')
                  print(appletObj)
                  print(self._qteMiniApplet)
                  return False
              if not appletObj.qteIsVisible():
                  appletObj.show(True)
          else:
              if not appletObj.qteIsVisible():
                  # Add the applet to the layout by replacing the
                  # currently active applet.
                  self.qteReplaceAppletInLayout(appletObj)
  
          # Update the qteActiveApplet pointer. Note that the actual
          # focusing is done exclusively in the focus manager.
          self._qteActiveApplet = appletObj
          return True