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

Wrong TextEdit::contentWidth

    XMLWordPrintable

Details

    • qtdeclarative/stable: 2074386df9ce8a72b6fb2553bb7a5a353964c7b4

    Description

      Run the following test case and observe the blue rectangle that indicates the content size of TextEdit.

      import QtQuick 2.1
      
      Item {
          width: 320
          height: 240
      
          Flickable {
              id: flickable
              anchors.fill: parent
      
              TextEdit {
                  id: edit
                  wrapMode: TextEdit.WordWrap
                  text: new Array(256).join("adgadg adgadg gda gd dgadg dgaadgadg")
      
                  width: flickable.width
                  height: flickable.height
      
                  // observe the blue rect indicating TextEdit's content size
                  Rectangle {
                      width: edit.contentWidth
                      height: edit.contentHeight
                      color: "blue"; opacity: 0.2
                  }
              }
          }
      }
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jpnurmi J-P Nurmi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes