Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-19109

Regression: TextEdit doesn't reposition cursorDelegate when set to readOnly

    XMLWordPrintable

Details

    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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            denexter Andrew den Exter (closed Nokia identity) (Inactive)
            guid Anojan Sugirtharatnam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes