Hi,

AFAIK, because completion are triggered by user inputs not by programmatically setting text. So you should call QCompleter::setCompletionPrefix() after setText and before QCompleter::complete()