PDA

View Full Version : QCompleter with QLineEdit->setText()



Sashabn
20th January 2016, 09:37
Hi, how can i use Completer with lineEdit when i setText in line by my custom button ?
Completer wont popup with my custom button, and with keyboard it popup.
Thanks a lot.
:)

ChrisW67
20th January 2016, 19:56
At a guess you need to call:

edit->setText(text);
edit->completer()->setCompletionPrefix(text); // might not be needed
edit->completer()->complete();