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

Double-clicking text in a TextArea selects the whole paragraph

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.7.1
    • 5.7.0
    • Quick: Controls 2
    • None
    • Ubuntu 16.04
    • 3a7d3a8aa90e2b26a98eff1df0b93965976a699d

    Description

      Usually this behaviour occurs upon a triple click.

      Possibly related to the press handler code.

      import QtQuick 2.5
      import QtQuick.Layouts 1.1
      import QtQuick.Controls 1.4 as QQC1
      import QtQuick.Controls 2.1 as QQC2
      import Qt.labs.platform 1.0
      
      QQC2.ApplicationWindow {
          id: window
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Shortcut {
              sequence: "Ctrl+Q"
              onActivated: Qt.quit()
          }
      
          property string t: "Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah" +
                                " blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah" +
                                " blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah"
      
          ColumnLayout {
              anchors.fill: parent
      
              ColumnLayout {
                  QQC2.Label {
                      text: "Qt Quick TextInput"
                  }
      
                  TextInput {
                      text: t
                      wrapMode: TextEdit.Wrap
                      selectByMouse: true
                  }
      
                  QQC2.Label {
                      text: "Qt Quick TextEdit"
                  }
      
                  TextEdit {
                      text: t
                      wrapMode: TextEdit.Wrap
                      selectByMouse: true
                  }
      
                  QQC2.Label {
                      text: "QQC1 TextArea"
                  }
      
                  QQC1.TextArea {
                      text: t
                      // Another bug? Can't use QQC1.TextArea.Wrap here...
                      wrapMode: QQC2.TextArea.Wrap
      
                      Layout.fillWidth: true
                  }
      
                  QQC2.Label {
                      text: "QQC2 TextArea"
                  }
      
                  QQC2.TextArea {
                      text: t
                      wrapMode: QQC2.TextArea.Wrap
                      selectByMouse: true
      
                      Layout.fillWidth: true
                  }
              }
          }
      }
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes