Hi All,
I am using QCompleter on QLineEdit. I am able to attach completer and popup is display with the filter of text I typed. The only challenge is that whatever filtered list is there I am able to select with arrow key but when I tried to select item from popup using mouse, it is not happening.
I have written below code.
QStringList frecs
= {"One",
"Two",
"Three",
"Four",
"Five"} completer
->setCompletionMode
(QCompleter::PopupCompletion);
completer->setFilterMode(Qt::MatchContains);
completer->setCaseSensitivity(Qt::CaseInsensitive);
completer->popup()->installEventFilter(this);
ui->txSearch->setCompleter(completer);
QStringList frecs = {"One","Two","Three","Four","Five"}
QCompleter *completer = new QCompleter(frecs, this);
completer->setCompletionMode(QCompleter::PopupCompletion);
completer->setFilterMode(Qt::MatchContains);
completer->setCaseSensitivity(Qt::CaseInsensitive);
completer->popup()->installEventFilter(this);
ui->txSearch->setCompleter(completer);
To copy to clipboard, switch view to plain text mode
Can anybody help to resolve this issue.
Cheers
Manish
Bookmarks