From 28165d54467179c7c16c38cea2a5f6e43367f385 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Thu, 4 Aug 2011 10:58:26 +1000 Subject: Move cursorDelegate with the mouse selection of read only text input. Task-number: QTBUG-20719 Task-number: QTBUG-19109 Reviewed-by: Martin Jones Change-Id: I2cec51eb5b01dc5750614edf5b39d6a3da661fc6 Reviewed-by: Joona Petrell --- src/widgets/widgets/qwidgettextcontrol.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index c63dcf0318..2a6831eb93 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -1696,8 +1696,10 @@ void QWidgetTextControlPrivate::mouseMoveEvent(QEvent *e, Qt::MouseButton button #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); @@ -1744,8 +1746,10 @@ void QWidgetTextControlPrivate::mouseReleaseEvent(QEvent *e, Qt::MouseButton but repaintOldAndNewSelection(oldSelection); - if (cursor.position() != oldCursorPos) + if (cursor.position() != oldCursorPos) { emit q->cursorPositionChanged(); + emit q->microFocusChanged(); + } if (interactionFlags & Qt::LinksAccessibleByMouse) { if (!(button & Qt::LeftButton)) -- cgit v1.2.3