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

wrong TextArea implicit/painted values

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.7.0 RC
    • 5.7.0 Alpha
    • Quick: Controls 2
    • None
    • 67f3da65d7d11af025a9bdd54d08ca0bf764c3ce

    Description

      TextArea's painted/implicit width/height values not corresponds to actual painted values. the are still limited by parent item
      For example, placing TextArea inside Flickable has following drawback: scrolling long text down I see that text is cut at the edge if parent item

      import QtQuick 2.6
      import Qt.labs.controls 1.0
      
      ApplicationWindow {
          visible: true
      
          Flickable {
              id: flick
              anchors.fill: parent
              ScrollBar.vertical: ScrollBar {}
              contentWidth: textEdit.implicitWidth
              contentHeight: textEdit.implicitHeight
              flickableDirection: Flickable.VerticalFlick
              clip: true
      
              TextArea {
                  id: textEdit
                  placeholderText: "Enter command..."
                  text: "aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa"
                      + "aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa "
                      + "aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa "
                  width: flick.width
                  height: flick.height
                  wrapMode: TextEdit.Wrap
              }
          }
      }
      

      Exchanging TextArea to TextEdit fix the problem

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            vladest Vlad Stelmahovsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes