def hide(self, fromQtmacs: bool=False):
        """
        Overloaded ``hide()`` function to avoid calling it
        accidentally.

        This method is a (weak) security mechanism to prevent
        programmers from using the ``hide`` method as originally
        intended by Qt, ie. to hide a window. However, in Qtmacs,
        applets can only be made invisible by either killing them with
        ``qteKillApplet`` or replacing them with another applet (see
        eg. ``qteReplaceAppletInLayout``). Using the Qt native
        ``hide()`` method messes with the Qtmacs layout engine and can
        lead to unexpected visual results and more serious errors.

        This method should only be used by ``QtmacsMain`` to implement
        the layout but not by any applets or macros, unless it is for
        a widget not under the control of Qtmacs (probably a bad
        idea).

        |Args|

        * *fromQtmacs (**bool**): if **True** then the original
           ``hide()`` method is called

        |Returns|

        * **None**

        |Raises|

        * **QtmacsArgumentError** if at least one argument has an invalid type.
        """
        if not fromQtmacs:
            # Log a warning message if someone tries to call the
            # native hide() method.
            msg = ('hide() command for applet <b>{}</b> ignored. Use '
                   ' qteNewApplet instead.'.format(self.qteAppletID()))
            self.qteLogger.warning(msg)
        else:
            # If we are explicitly requested to hide() the widget,
            # then clear the Qtmacs internal visibility flag (will be
            # used in the focus manager to double check that Qtmacs
            # and Qt agree on which widgets are visible), remove the
            # applet from the QtmacsSplitter by re-parenting it to
            # **None**, and tell Qt to actually hide the widget as
            # soon as the event loop is in control again.
            self._qteAdmin.isVisible = False
            self.qteReparent(None)
            QtGui.QWidget.hide(self)