Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.4, 4.8.x
-
None
Description
TextEdit doesn't reposition cursorDelegate when TextEdit is set to readOnly. This only happens when clicked with the mouse. The cursor repositions properly when cursorPosition is changed externally. This bug doesn't appear when run with qmlscene or any previous version of Qt (tested with April 14, 2011 compile of Qt 4.8).
import QtQuick 1.1 TextEdit { height: 700 width: 100 text: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." readOnly: true selectByMouse: true wrapMode: TextEdit.WordWrap cursorDelegate: Rectangle{ color: "yellow" opacity: .1 anchors.left: parent.left anchors.right: parent.right height: height } }
Current work around is to use:
onCursorPositionChanged: { select(cursorPosition,cursorPosition) }
but we'll loose the ability to select text and seems not as responsive.
Attachments
For Gerrit Dashboard: QTBUG-19109 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
291,1 | Ensure the TextEdit cursor delegate is repositioned on mouse events. | master | qt/qtbase | Status: MERGED | +2 | 0 |