summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qlineedit_p.cpp
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2018-05-30 20:58:24 +0200
committerAndy Shaw <andy.shaw@qt.io>2018-06-01 21:34:03 +0000
commitc901cdadc0a6ec65eddfe4f181274e56567f9973 (patch)
tree0cd722d395efc2b96a394ac862f1cda6ff61a9c3 /src/widgets/widgets/qlineedit_p.cpp
parente3e0a6d6d6c50dc21439f24728ee3614c5825d36 (diff)
QLineEdit: Add an inputRejected() signal for when a key is not allowed
[ChangeLog][QtWidgets][QLineEdit] Added inputRejected() signal for when a key press is not accepted by the QLineEdit. For instance, when an invalid key is pressed for a validator set. Task-number: QTBUG-57448 Change-Id: I39182a78b07b37c6da01905b8da4c57930e3454b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qlineedit_p.cpp')
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index acf49cda72..bfb92468be 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -214,6 +214,7 @@ void QLineEditPrivate::init(const QString& txt)
QObject::connect(control, SIGNAL(updateNeeded(QRect)),
q, SLOT(_q_updateNeeded(QRect)));
+ QObject::connect(control, SIGNAL(inputRejected()), q, SIGNAL(inputRejected()));
QStyleOptionFrame opt;
q->initStyleOption(&opt);