code: def eventFilter(self, editor, event):
          
          if event.type() == QtCore.QEvent.FocusIn:
              editor.setContentFocus()
              return True
  
          return super(ComponentDelegate, self).eventFilter(editor, event)
docs: Sets focus to the editor. :qtdoc:`Re-implemented<QStyledItemDelegate.eventFilter>`