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

QtQuick TextInput and TextEdit should use an IBeam mouse cursor by default

    XMLWordPrintable

    Details

    • Commits:
      23f78b6b76fb9350a472485e34857e1a4842e5d3 (qt/qtdeclarative/5.12)

      Description

      QQuickItem::cursor is not a property - there is only a non-invokable setCursor. So, there is no way from QML to set the cursor on an Item in general - only on MouseArea. But since these particular items are for entering text, and they do allow setting the text cursor position via the mouse, they ought to behave like any other text-input widgets in any other widget toolkit (including Qt's).

      Alternatively we could make cursor (or cursorShape) into an Item property, if someone thinks there's something wrong with changing the default cursor suddenly.

      The workaround in QtQuick.Controls is to put a MouseArea on top. ( src/controls/TextArea.qml:845) That MA has other uses besides changing the cursor, but in simpler use cases this kind of hack should not be necessary.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-50482
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              srutledg Shawn Rutledge
              Reporter:
              srutledg Shawn Rutledge
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes