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

Qml TextArea Selecting one character with the mouse on small and medium font sizes works very incorrectly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 6.5.3
    • None
    • Windows 10 x64
    • macOS, Windows

    Description

      Selecting one character with the mouse in small and medium font sizes does not work very correctly. When using TextEdit, single character selection works correctly with the same font size. Also, when using a large font size in the TextArea element, highlighting one character also works correctly.
      Windows 10 x64 system
      Resolution 1920x1080

      I am attaching an archive with a code for reproduction.
      I also attach a video with this behavior.

      main.qml from the archive:

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Layouts
      
      Window {
          width: 900
          height: 300
          visible: true
      
          ColumnLayout {
              anchors.fill: parent
              anchors.margins: 10
              spacing: 10
      
              TextEdit {
                  Layout.fillWidth: true
                  Layout.preferredHeight: parent.height / 3
                  text: "TextEdit 120 x 80 4 sh 140 c 16 28 sh 3737"
                  font.pointSize: 10
              }
      
              TextArea {
                  Layout.fillWidth: true
                  Layout.preferredHeight: parent.height / 3
                  text: "TextArea 120 x 80 4 sh 140 c 16 28 sh 3737"
                  font.pointSize: 10
              }
      
              TextArea {
                  Layout.fillWidth: true
                  Layout.preferredHeight: parent.height / 3
                  text: "TextArea (big font) 120 x 80 4 sh 140 c 16 28 sh 3737"
                  font.pointSize: 25
              }
          }
      }
      

      Added:
      In addition to the problem when selecting one character, the following problem is observed: if before starting the selection you hold down the left mouse button for 1.5 - 3 seconds and then try to move the mouse pointer to select text, then in the case of TextArea (regardless of the font size) it is not possible to select the text (one symbol or many, does not matter in this case). I am attaching an additional video for demonstration (the project for testing is the same as in the first case).

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              rumgot rumgot
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes