CuteLogger
Fast and simple logging solution for Qt based applications
lineeditclear.h
1/****************************************************************************
2**
3** Copyright (c) 2007 Trolltech ASA <info@trolltech.com>
4** Copyright (c) 2024 Meltytech, LLC
5**
6** Use, modification and distribution is allowed without limitation,
7** warranty, liability or support of any kind.
8**
9****************************************************************************/
10
11#ifndef LINEEDIT_H
12#define LINEEDIT_H
13
14#include <QLineEdit>
15
16class QToolButton;
17
18class LineEditClear : public QLineEdit
19{
20 Q_OBJECT
21
22public:
23 LineEditClear(QWidget *parent = 0);
24
25protected:
26 void resizeEvent(QResizeEvent *) override;
27 bool eventFilter(QObject *target, QEvent *event) override;
28
29private slots:
30 void updateCloseButton(const QString &text);
31
32private:
33 QToolButton *clearButton;
34};
35
36#endif // LIENEDIT_H
37