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 
16 class QToolButton;
17 
18 class LineEditClear : public QLineEdit
19 {
20  Q_OBJECT
21 
22 public:
23  LineEditClear(QWidget *parent = 0);
24 
25 protected:
26  void resizeEvent(QResizeEvent *) override;
27  bool eventFilter(QObject *target, QEvent *event) override;
28 
29 private slots:
30  void updateCloseButton(const QString &text);
31 
32 private:
33  QToolButton *clearButton;
34 };
35 
36 #endif // LIENEDIT_H