Qt Utilities  5.6.0
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
clearplaintextedit.h
Go to the documentation of this file.
1 #ifndef WIDGETS_CLEARPLAINTEXTEDIT_H
2 #define WIDGETS_CLEARPLAINTEXTEDIT_H
3 
4 #include "./buttonoverlay.h"
5 
6 #include <QPlainTextEdit>
7 
8 namespace Widgets {
9 
10 class QT_UTILITIES_EXPORT ClearPlainTextEdit : public QPlainTextEdit, public ButtonOverlay
11 {
12  Q_OBJECT
13 public:
14  explicit ClearPlainTextEdit(QWidget *parent = nullptr);
16  bool isCleared() const;
17 
18 private Q_SLOTS:
19  void handleTextChanged();
20  void handleClearButtonClicked();
21  void handleScroll();
22 
23 };
24 
25 } // namespace Widgets
26 
27 #endif // WIDGETS_CLEARPLAINTEXTEDIT_H
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
The ButtonOverlay class is used to display buttons on top of other widgets.
Definition: buttonoverlay.h:17
Provides a set of extended widgets such as ClearLineEdit and ClearComboBox.
Definition: buttonoverlay.h:13
A QPlainTextEdit with an embedded button for clearing its contents.