Remove the mini applet.

        If a different applet is to be restored/focused then call
        ``qteMakeAppletActive`` for that applet *after* calling this
        method.

        |Args|

        * **None**

        |Returns|

        * **None**

        |Raises|

        * **None**

def qteKillMiniApplet(self):
        """
        Remove the mini applet.

        If a different applet is to be restored/focused then call
        ``qteMakeAppletActive`` for that applet *after* calling this
        method.

        |Args|

        * **None**

        |Returns|

        * **None**

        |Raises|

        * **None**
        """
        # Sanity check: is the handle valid?
        if self._qteMiniApplet is None:
            return

        # Sanity check: is it really a mini applet?
        if not self.qteIsMiniApplet(self._qteMiniApplet):
            msg = ('Mini applet does not have its mini applet flag set.'
                   ' Ignored.')
            self.qteLogger.warning(msg)

        if self._qteMiniApplet not in self._qteAppletList:
            # Something is wrong because the mini applet is not part
            # of the applet list.
            msg = 'Custom mini applet not in applet list --> Bug.'
            self.qteLogger.warning(msg)
        else:
            # Inform the mini applet that it is about to be killed.
            try:
                self._qteMiniApplet.qteToBeKilled()
            except Exception:
                msg = 'qteToBeKilledRoutine is faulty'
                self.qteLogger.exception(msg, exc_info=True, stack_info=True)

            # Shorthands to calling window.
            win = self._qteMiniApplet._qteCallingWindow

            # We need to move the focus from the mini applet back to a
            # regular applet. Therefore, first look for the next
            # visible applet in the current window (ie. the last one
            # that was made active).
            app = self.qteNextApplet(windowObj=win)
            if app is not None:
                # Found another (visible or invisible) applet --> make
                # it active/visible.
                self.qteMakeAppletActive(app)
            else:
                # No visible applet available in this window --> look
                # for an invisible one.
                app = self.qteNextApplet(skipInvisible=False, skipVisible=True)
                if app is not None:
                    # Found an invisible applet --> make it
                    # active/visible.
                    self.qteMakeAppletActive(app)
                else:
                    # There is no other visible applet in this window.
                    # The focus manager will therefore make a new applet
                    # active.
                    self._qteActiveApplet = None
            self._qteAppletList.remove(self._qteMiniApplet)

        # Close the mini applet applet and schedule it for deletion.
        self._qteMiniApplet.close()
        self._qteMiniApplet.deleteLater()

        # Clear the handle to the mini applet.
        self._qteMiniApplet = None