From 2fb4149f4646de4d9e7d3c9d0dbeb93c7615f856 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 8 May 2019 11:33:20 +0200 Subject: Assistant: Enable clear button in the index and search widgets Change-Id: Ifa37e14c33982db6c936fe077ed0639feed091f1 Reviewed-by: Jarek Kobus --- src/assistant/assistant/indexwindow.cpp | 1 + src/assistant/help/qhelpsearchquerywidget.cpp | 1 + 2 files changed, 2 insertions(+) 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); -- cgit v1.2.3