Qt Utilities
6.0.5
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
widgets
clearlineedit.h
Go to the documentation of this file.
1
#ifndef WIDGETS_CLEARLINEEDIT_H
2
#define WIDGETS_CLEARLINEEDIT_H
3
4
#include "
./buttonoverlay.h
"
5
6
#include <QLineEdit>
7
8
QT_FORWARD_DECLARE_CLASS(QHBoxLayout)
9
10
namespace
QtUtilities
{
11
12
class
IconButton;
13
14
class
QT_UTILITIES_EXPORT
ClearLineEdit
:
public
QLineEdit,
public
ButtonOverlay
{
15
Q_OBJECT
16
Q_PROPERTY(
bool
cleared READ isCleared)
17
18
public
:
19
explicit
ClearLineEdit
(QWidget *parent =
nullptr
);
20
~
ClearLineEdit
()
override
;
21
bool
isCleared()
const override
;
22
23
private
Q_SLOTS:
24
void
handleTextChanged(
const
QString &
text
);
25
void
handleClearButtonClicked()
override
;
26
};
27
}
// namespace QtUtilities
28
29
#endif // WIDGETS_CLEARLINEEDIT_H
QT_UTILITIES_EXPORT
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
QtUtilities::ClearLineEdit
A QLineEdit with an embedded button for clearing its contents.
Definition:
clearlineedit.h:14
QtUtilities::ButtonOverlay
The ButtonOverlay class is used to display buttons on top of other widgets.
Definition:
buttonoverlay.h:17
QtUtilities
!
Definition:
trylocker.h:8
text
#define text
Definition:
xmlparsermacros.h:18
buttonoverlay.h
Generated on Tue Mar 17 2020 21:01:13 for Qt Utilities by
1.8.17