forked from qt-creator/qt-creator
Allow to clear search string
Change-Id: If88d74755e9f95d2aabd2aa770c9bdbb5bd98309 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Laurent Montel
parent
72246866c3
commit
bdb0f264d2
@@ -56,6 +56,7 @@ FindToolWindow::FindToolWindow(FindPlugin *plugin, QWidget *parent)
|
||||
{
|
||||
m_instance = this;
|
||||
m_ui.setupUi(this);
|
||||
m_ui.searchTerm->setFiltering(true);
|
||||
m_ui.searchTerm->setPlaceholderText(QString());
|
||||
setFocusProxy(m_ui.searchTerm);
|
||||
|
||||
|
@@ -42,6 +42,7 @@
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/theme/theme.h>
|
||||
#include <utils/fancylineedit.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QFrame>
|
||||
@@ -61,13 +62,17 @@ namespace Core {
|
||||
namespace Internal {
|
||||
|
||||
class WideEnoughLineEdit : public QLineEdit
|
||||
class WideEnoughLineEdit : public Utils::FancyLineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
WideEnoughLineEdit(QWidget *parent) : QLineEdit(parent)
|
||||
WideEnoughLineEdit(QWidget *parent) : Utils::FancyLineEdit(parent)
|
||||
{
|
||||
setFiltering(true);
|
||||
setPlaceholderText(QString());
|
||||
connect(this, &QLineEdit::textChanged, this, &QLineEdit::updateGeometry);
|
||||
|
||||
}
|
||||
|
||||
QSize sizeHint() const
|
||||
|
Reference in New Issue
Block a user