Show a clear button in the Quick Filter text field in GUI. (#1603)

This commit is contained in:
Lauri Nurmi 2019-01-15 11:35:23 +02:00 committed by amai2012
parent 3bbd9fc9a4
commit a7a0a54557
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) :
// "Filter" toolbar
mLineEditFilter = new QLineEdit(mUI.mToolBarFilter);
mLineEditFilter->setPlaceholderText(tr("Quick Filter:"));
mLineEditFilter->setClearButtonEnabled(true);
mUI.mToolBarFilter->addWidget(mLineEditFilter);
connect(mLineEditFilter, SIGNAL(textChanged(const QString&)), mFilterTimer, SLOT(start()));
connect(mLineEditFilter, &QLineEdit::returnPressed, this, &MainWindow::filterResults);