diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-08-04 10:58:26 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-05 04:07:17 +0200 |
commit | 8febd569408db19c8a83e16cc7a8574f9b00084b (patch) | |
tree | b59e7a73911b9eaa8a2847d3b99b16e0360bc3c8 /src/gui/text/qtextcontrol.cpp | |
parent | c8baa5602a478fb4e2907b8a319397c15a72ad1c (diff) |
Move cursorDelegate with the mouse selection of read only text input.
Task-number: QTBUG-19109
Reviewed-by: Martin Jones
Change-Id: I709427fe73b2d6ed9e3526af140b9dc375740789
Reviewed-on: http://codereview.qt.nokia.com/4164
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Diffstat (limited to 'src/gui/text/qtextcontrol.cpp')
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index c29379ed28..a03dabf52a 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1674,8 +1674,10 @@ void QTextControlPrivate::mouseMoveEvent(QEvent *e, Qt::MouseButton button, cons #endif //QT_NO_IM } else { //emit q->visibilityRequest(QRectF(mousePos, QSizeF(1, 1))); - if (cursor.position() != oldCursorPos) + if (cursor.position() != oldCursorPos) { emit q->cursorPositionChanged(); + emit q->microFocusChanged(); + } } selectionChanged(true); repaintOldAndNewSelection(oldSelection); @@ -1719,8 +1721,10 @@ void QTextControlPrivate::mouseReleaseEvent(QEvent *e, Qt::MouseButton button, c repaintOldAndNewSelection(oldSelection); - if (cursor.position() != oldCursorPos) + if (cursor.position() != oldCursorPos) { emit q->cursorPositionChanged(); + emit q->microFocusChanged(); + } if (interactionFlags & Qt::LinksAccessibleByMouse) { if (!(button & Qt::LeftButton)) |