summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-08 11:33:20 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-10 06:30:26 +0000
commit2fb4149f4646de4d9e7d3c9d0dbeb93c7615f856 (patch)
tree118da140a0d1f11be7a92cac7d3b10c8fe0aabf4
parent6c1ca200d52d671b1f33125d99d6e0cd6d469634 (diff)
Assistant: Enable clear button in the index and search widgets
Change-Id: Ifa37e14c33982db6c936fe077ed0639feed091f1 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
-rw-r--r--src/assistant/assistant/indexwindow.cpp1
-rw-r--r--src/assistant/help/qhelpsearchquerywidget.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/assistant/assistant/indexwindow.cpp b/src/assistant/assistant/indexwindow.cpp
index 44ad56fad..5dd13c3bb 100644
--- a/src/assistant/assistant/indexwindow.cpp
+++ b/src/assistant/assistant/indexwindow.cpp
@@ -58,6 +58,7 @@ IndexWindow::IndexWindow(QWidget *parent)
layout->addWidget(l);
l->setBuddy(m_searchLineEdit);
+ m_searchLineEdit->setClearButtonEnabled(true);
connect(m_searchLineEdit, &QLineEdit::textChanged,
this, &IndexWindow::filterIndices);
m_searchLineEdit->installEventFilter(this);
diff --git a/src/assistant/help/qhelpsearchquerywidget.cpp b/src/assistant/help/qhelpsearchquerywidget.cpp
index 8cea26a83..de7f9e9f8 100644
--- a/src/assistant/help/qhelpsearchquerywidget.cpp
+++ b/src/assistant/help/qhelpsearchquerywidget.cpp
@@ -237,6 +237,7 @@ QHelpSearchQueryWidget::QHelpSearchQueryWidget(QWidget *parent)
QHBoxLayout* hBoxLayout = new QHBoxLayout();
d->m_searchLabel = new QLabel(this);
d->m_lineEdit = new QLineEdit(this);
+ d->m_lineEdit->setClearButtonEnabled(true);
d->m_lineEdit->setCompleter(&d->m_searchCompleter);
d->m_lineEdit->installEventFilter(d);
d->m_prevQueryButton = new QToolButton(this);