Set the completer case insensitive

Set the completer case insensitive to match with the suggestion's list
This commit is contained in:
luddens 2019-05-28 17:34:25 +02:00 committed by Matthieu Gautier
parent f47d8f2243
commit 18d123bcfb

View File

@ -62,6 +62,7 @@ SearchBar::SearchBar(QWidget *parent) :
{ {
setPlaceholderText(tr("Search")); setPlaceholderText(tr("Search"));
m_completer.setCompletionMode(QCompleter::UnfilteredPopupCompletion); m_completer.setCompletionMode(QCompleter::UnfilteredPopupCompletion);
m_completer.setCaseSensitivity(Qt::CaseInsensitive);
setCompleter(&m_completer); setCompleter(&m_completer);
connect(this, &QLineEdit::textEdited, this, &SearchBar::updateCompletion); connect(this, &QLineEdit::textEdited, this, &SearchBar::updateCompletion);
#if 0 //The `activated` signal seems to not be emitted if user navigate in the page. #if 0 //The `activated` signal seems to not be emitted if user navigate in the page.