def METHOD_NAME(self, event):
    if self._completer.popup().isVisible() and event.key() in self.__keysToIgnore:
        event.ignore()
        return
    super().METHOD_NAME(event)
    completion_prefix = self.textUnderCursor()
    if completion_prefix != self._completer.completionPrefix():
        self.__updateCompleterPopupItems(completion_prefix)
    if len(event.text()) > 0 and len(completion_prefix) > 0:
        self._completer.complete()
    if len(completion_prefix) == 0:
        self._completer.popup().hide()