diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-07-26 10:10:50 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-26 06:29:54 +0200 |
commit | f79b7b7c87ad69b9e07057a92c6628315b540a0e (patch) | |
tree | 80e9b116aaccf79a52dae963776342ce88977996 /src/declarative | |
parent | 245b16b4fb50620aaf49683eb85a93807defea6a (diff) |
Move the cursor position to the end when TextInput.readOnly is cleared.
Improves consistency with TextEdit.
Task-number: QTBUG-18747
Change-Id: Ieb0a332441557fc6ba4c5ddaafea5c634aff1ee4
Reviewed-on: http://codereview.qt.nokia.com/2131
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/items/qsgtextinput.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/items/qsgtextinput.cpp b/src/declarative/items/qsgtextinput.cpp index e73237eff8..fe7070548b 100644 --- a/src/declarative/items/qsgtextinput.cpp +++ b/src/declarative/items/qsgtextinput.cpp @@ -264,6 +264,8 @@ void QSGTextInput::setReadOnly(bool ro) setFlag(QSGItem::ItemAcceptsInputMethod, !ro); d->control->setReadOnly(ro); + if (!ro) + d->control->setCursorPosition(d->control->end()); emit readOnlyChanged(ro); } |