You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
821 B
C++
42 lines
821 B
C++
/****************************************************************************
|
|
**
|
|
** Copyright (c) 2007 Trolltech ASA <info@trolltech.com>
|
|
**
|
|
** Use, modification and distribution is allowed without limitation,
|
|
** warranty, liability or support of any kind.
|
|
**
|
|
****************************************************************************/
|
|
|
|
#ifndef LINEEDIT_H
|
|
#define LINEEDIT_H
|
|
|
|
#include <QLineEdit>
|
|
#include <QStylePainter>
|
|
#include <QToolButton>
|
|
|
|
class QToolButton;
|
|
|
|
class LineEdit : public QLineEdit
|
|
{
|
|
Q_OBJECT
|
|
|
|
QString mPlaceholderText;
|
|
|
|
public:
|
|
LineEdit(QWidget *parent = nullptr);
|
|
|
|
protected:
|
|
void resizeEvent(QResizeEvent *) override;
|
|
|
|
private slots:
|
|
void updateClearButton(const QString &text);
|
|
|
|
protected:
|
|
QToolButton *mClearButton;
|
|
|
|
void setupClearButton();
|
|
};
|
|
|
|
#endif // LIENEDIT_H
|
|
|