aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextinput.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2026-09-03 12:35:56 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2026-09-03 12:35:56 +0300
commit7ed17317a5013b1ab885ecc4ac61fb0ed3c1ab35 (patch)
tree7c208fe854d7dcfd7421c2ea20e3cd8a0812adfe /src/quick/items/qquicktextinput.cpp
parent175e30c1a74c2b4efa5a6fe5c45d289660b51d2f (diff)
parent2d9e5e76640cd16724ec2fef20d60109537be0bd (diff)
Merge tag 'v6.5.10-lts-lgpl' into 6.56.5
Qt 6.5.10-lts-lgpl release
Diffstat (limited to 'src/quick/items/qquicktextinput.cpp')
-rw-r--r--src/quick/items/qquicktextinput.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index 08713eb026..495f99505f 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -49,6 +49,13 @@ Q_LOGGING_CATEGORY(lcQuickTextInput, "qt.quick.textInput")
and setting \l echoMode to an appropriate value enables TextInput to be used for
a password input field.
+ To react to the user accepting text via the Return or Enter keys, handle
+ the \l accepted() signal. When Return or Enter are pressed and the text
+ input loses focus, \l editingFinished() will be emitted. When the text is
+ edited in any way by the user, \l textEdited() is emitted. These signals
+ \l {Property change signals}{should be preferred} over \c textChanged()
+ in most cases.
+
On \macos, the Up/Down key bindings for Home/End are explicitly disabled.
If you want such bindings (on any platform), you will need to construct them in QML.
@@ -96,7 +103,8 @@ void QQuickTextInput::componentComplete()
the \l preeditText property. To get whole text displayed in the TextInput
use \l displayText property.
- \sa clear(), displayText, preeditText
+ \sa clear(), displayText, preeditText, accepted(), editingFinished(),
+ textEdited()
*/
QString QQuickTextInput::text() const
{
@@ -1184,6 +1192,8 @@ bool QQuickTextInput::hasAcceptableInput() const
Note that if there is a \l validator or \l inputMask set on the text
input, the signal will only be emitted if the input is in an acceptable
state.
+
+ \sa editingFinished(), textEdited()
*/
/*!
@@ -1195,6 +1205,8 @@ bool QQuickTextInput::hasAcceptableInput() const
inputMask set on the text input and enter/return is pressed, this
signal will only be emitted if the input follows
the inputMask and the validator returns an acceptable state.
+
+ \sa accepted(), textEdited()
*/
/*!
@@ -1204,6 +1216,8 @@ bool QQuickTextInput::hasAcceptableInput() const
This signal is emitted whenever the text is edited. Unlike \c textChanged(),
this signal is not emitted when the text is changed programmatically, for example,
by changing the value of the \c text property or by calling \c clear().
+
+ \sa accepted(), editingFinished()
*/
#if QT_CONFIG(im)