diff options
| author | Dheerendra Purohit <qtgardener@pthinks.com> | 2024-11-22 12:05:01 +0530 |
|---|---|---|
| committer | Dheerendra Purohit <dheerendra@pthinks.com> | 2024-12-02 08:58:05 +0530 |
| commit | ebb30f71d07472f7ff8998a7ea52b95d28dae485 (patch) | |
| tree | 0729bb16ce2044ee9f2aa5337084e58d83865c84 /src/quick/items/qquicktextedit.cpp | |
| parent | ce5ef80bb3f1f8048efcec358bc4de4624c6f301 (diff) | |
Add textEdited() signal to TextEdit
textEdited() signal is emitted whenever the text is edited.
[ChangeLog][TextEdit] Added textEdited() signal.
Fixes: QTBUG-103718
Change-Id: Ib3fa5a38aeadd6167aafc0dea91f02bd9e6df7cc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/items/qquicktextedit.cpp')
| -rw-r--r-- | src/quick/items/qquicktextedit.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index fa872b273b..e20ba63b9f 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -2912,6 +2912,8 @@ void QQuickTextEdit::q_textChanged() } emit textChanged(); + if (d->control->isBeingEdited()) + emit textEdited(); } void QQuickTextEdit::markDirtyNodesForRange(int start, int end, int charDelta) @@ -3544,6 +3546,15 @@ void QQuickTextEditPrivate::updateMouseCursorShape() \sa linkHovered, linkAt() */ +/*! + \qmlsignal QtQuick::TextEdit::textEdited() + \since 6.9 + + This signal is emitted whenever the text is edited. Unlike \l textChanged(), + this signal is not emitted when the text is changed programmatically, for example, + by changing the value of the \l text property or by calling \l clear(). +*/ + QString QQuickTextEdit::hoveredLink() const { Q_D(const QQuickTextEdit); |
