def _insertCompletion(self, completion):
        extra = len(completion) - len(self.completer.completionPrefix())
        extra_text = completion[-extra:]
        if self._addSpaceAfterCompleting:
            extra_text += ' '
        self.setText(self.text() + extra_text)
This is the event handler for the QCompleter.activated(QString) signal,
dataset/ETHPy150Open akehrer/Motome/Motome/Models/AutoCompleterModel.py/AutoCompleteEdit._insertCompletion