docs: def qteAddWidget(self, widgetObj: QtGui.QWidget, isFocusable: bool=True,
                       widgetSignature: str=None, autoBind: bool=True):
          """
          Augment the standard Qt ``widgetObj`` with Qtmacs specific fields.
  
          Example: from a programmers perspective there is no difference
          between::
  
              wid = QtGui.QTextEdit(self)
  
          and::
  
              wid = self.qteAddWidget(QtGui.QTextEdit(self))
  
          Both return a handle to a Qt widget (a ``QTextEdit`` in this
          case). However, the ``qteAddWidget`` adds the following fields
          to the object:
  
          * ``_qteAdmin``: this is an instance of the ``QtmacsAdminStructure``
            to tell Qtmacs how to treat the widget.
          * ``qteSignature``: an attribute that returns the signature of the
            widget and equals ``widgetSignature``. If no such signature was
            specified it defaults to the Qt internal name as a string, eg.
            for a push button this would be 'QPushButton'.
          * ``qteSetKeyFilterPolicy``: this points directly to the equally
            named method inside the _qteAdmin object. This is a convenience
            shortcut to avoid using the _qteAdmin structure directly in
            macro/applet code, because only Qtmacs itself should temper
            with it.
  
          |Args|
  
          * ``widgetObj`` (**QWidget**): any widget from the QtGui library.
          * ``isFocusable`` (**bool**): whether or not the widget can
            receive the focus.
          * ``widgetSignature`` (**str**): specify the widget signature
            (defaults to class name)
          * ``autoBind`` (**bool**): if **True** and ``widgetSignature``
            is a recognisable name (eg. **QTextEdit**) then automatically
            load the appropriate key-bindings for this widget.
  
          |Returns|
  
          * **QWidget**: handle to widget object (or **None** if it could
            not be added).
  
          |Raises|
  
          * **QtmacsArgumentError** if at least one argument has an invalid type.
          """
          # Add a Qtmacs data structure to the widget to allow their
          # event administration. Note that, in all likelihood, the
          # widget is an arbitrary Qt widget (eg. QLineEdit,
          # QPushButton, etc).
          widgetObj._qteAdmin = QtmacsAdminStructure(
              self, isFocusable=isFocusable)
          widgetObj._qteAdmin.appletID = self._qteAdmin.appletID
  
          # Specify that this widget is not a QtmacsApplet.
          widgetObj._qteAdmin.isQtmacsApplet = False
  
          # Remember the signature of the applet containing this widget.
          widgetObj._qteAdmin.appletSignature = self.qteAppletSignature()
  
          # Set the widget signature. If none was specified, use the
          # class name (eg. QLineEdit).
          if widgetSignature is None:
              widgetObj._qteAdmin.widgetSignature = widgetObj.__class__.__name__
          else:
              widgetObj._qteAdmin.widgetSignature = widgetSignature
  
          # For convenience, as it is otherwise difficult for the macro
          # programmer to determine the widget signature used by Qtmacs.
          # Note: the "wo" is only a shorthand to avoid too long lines.
          wo = widgetObj
          wo.qteSignature = wo._qteAdmin.widgetSignature
          wo.qteSetKeyFilterPolicy = wo._qteAdmin.qteSetKeyFilterPolicy
          del wo
  
          # Add the widget to the widgetList of this QtmacsApplet.
          # Important: this MUST happen before macros and key-bindings are loaded
          # and bound automatically (see code below) because the method to
          # bind the keys will verify that the widget exists in ``widgetList``.
          self._qteAdmin.widgetList.append(widgetObj)
  
          # If a widget has a default key-bindings file then the global
          # dictionary ``default_widget_keybindings`` will contain its
          # name.
          default_bind = qte_global.default_widget_keybindings
          if autoBind and (widgetObj.qteSignature in default_bind):
              # Shorthand.
              module_name = default_bind[widgetObj.qteSignature]
  
              # Import the module with the default key-bindings for the
              # current widget type.
              try:
                  mod = importlib.import_module(module_name)
              except ImportError:
                  msg = ('Module <b>{}</b> could not be imported.'.format(
                         module_name))
                  self.qteLogger.exception(msg, stack_info=True)
                  return
  
              if hasattr(mod, 'install_macros_and_bindings'):
                  # By convention, the module has an
                  # install_macros_and_bindings method. If an error
                  # occurs intercept it, but do not abort the method
                  # since the error only relates to a failed attempt to
                  # apply default key-bindings, not to register the
                  # widget (the main purpose of this method).
                  try:
                      mod.install_macros_and_bindings(widgetObj)
                  except Exception:
                      msg = ('<b>install_macros_and_bindings</b> function'
                             ' in <b>{}</b> did not execute properly.')
                      msg = msg.format(module_name)
                      self.qteLogger.error(msg, stack_info=True)
              else:
                  msg = ('Module <b>{}</b> has no '
                         '<b>install_macros_and_bindings</b>'
                         ' method'.format(module_name))
                  self.qteLogger.error(msg)
  
          return widgetObj