Qt Utilities  5.10.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  Q_OBJECT
12 public:
13  explicit ClearPlainTextEdit(QWidget *parent = nullptr);
15  bool isCleared() const;
16 
17 private Q_SLOTS:
18  void handleTextChanged();
19  void handleClearButtonClicked();
20  void handleScroll();
21 };
22 
23 } // namespace Widgets
24 
25 #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.