docs: def qteSaveMacroData(self, data, widgetObj: QtGui.QWidget=None):
          """
          Associate arbitrary ``data`` with ``widgetObj``.
  
          This is a convenience method to easily store applet/widget
          specific information in between calls.
  
          If ``widgetObj`` is **None** then the calling widget
          ``self.qteWidget`` will be used.
  
          Note that this function overwrites any previously saved data.
  
          |Args|
  
          * ``data`` (**object**): arbitrary python object to save.
          * ``widgetObj`` (**QWidget**): the widget/applet with which
            the data should be associated.
  
          |Returns|
  
          * **None**
  
          |Raises|
  
          * **QtmacsArgumentError** if at least one argument has an invalid type.
          * **QtmacsOtherError** if ``widgetObj`` was not added with
            ``qteAddWidget`` method.
          """
  
          # Check type of input arguments.
          if not hasattr(widgetObj, '_qteAdmin') and (widgetObj is not None):
              msg = '<widgetObj> was probably not added with <qteAddWidget>'
              msg += ' method because it lacks the <_qteAdmin> attribute.'
              raise QtmacsOtherError(msg)
  
          # If no widget was specified then use the calling widget.
          if not widgetObj:
              widgetObj = self.qteWidget
  
          # Store the supplied data in the applet specific macro storage.
          widgetObj._qteAdmin.macroData[self.qteMacroName()] = data