code: def tab_focus_request(self, reason):
          
          widget = self.focus_target()
          if not widget.focusPolicy & Qt.TabFocus:
              return False
          if not widget.isEnabled():
              return False
          if not widget.isVisibleTo(widget.window()):
              return False
          widget.setFocus(reason)
          return False
docs: Handle a custom tab focus request.
  
          This method is called when focus is being set on the proxy
          as a result of a user-implemented focus traversal handler.
          This can be reimplemented by subclasses as needed.
  
          Parameters
          ----------
          reason : Qt.FocusReason
              The reason value for the focus request.
  
          Returns
          -------
          result : bool
              True if focus was set, False otherwise.