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

TextArea multi-line placeholder text overlaps the TextEdit area

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 6.6.0, 6.7.0
    • Quick: Controls 2
    • None
    • Android 11
    • Android
    • 8f876c620 (dev), 51c6cac7e (6.7), 6986f1c26 (6.6), b13500e7e (tqtc/lts-6.5)

    Description

      The thing is that normally the `placeholderText` of TextField and TextArea elements disappear when input text to the element. This behavior happens on WASM and Linux Desktop(those I have tried).

      But in Android, the placeholder text does not disappear it moves to the top of the element.

      Also, in the case of TextArea, the input text gets on top of the placeholder text(this is the BUG). 

      I expect the behavior to be the same across platforms because Qt is multiplatform.(this is a minor bug)

       I prefer the behavior on Wasm and Linux Desktop platforms.

      To reproduce the issue, run the following example:

      import QtQuick
      import QtQuick.Controls.Material
      import QtQuick.Layouts
      
      ApplicationWindow {
          id: window
          width: 640
          height: 480
          visible: true
      
          ColumnLayout {
              anchors.fill: parent
      
              TextField {
                  Layout.margins: 20
                  Layout.fillWidth: true
                  placeholderText: "placeholderText1"
              }
              TextField {
                  Layout.margins: 20
                  Layout.fillWidth: true
                  placeholderText: "placeholderText2"
                  background: Rectangle {
                      border.width: 1 // TextControlBorderThemeThickness
                      border.color: "white"
                      color: "transparent"
                  }
              }
              TextArea {
                  Layout.margins: 20
                  Layout.fillHeight: true
                  Layout.fillWidth: true
                  placeholderText: "placeholderText \n of many lines\m maybe is in JSON \n format"
              }
          }
      }
      

      The resulting GUI for my android device is attached in the pictures.

       

      Attachments

        1. customized.qml
          1 kB
        2. default.qml
          0.7 kB
        3. default-material-style-macos.jpg
          default-material-style-macos.jpg
          64 kB
        4. Screenshot_20230928-094521.jpg
          Screenshot_20230928-094521.jpg
          88 kB
        5. Screenshot_20230928-094611.jpg
          Screenshot_20230928-094611.jpg
          85 kB
        6. Screenshot_20230928-094623-1.jpg
          Screenshot_20230928-094623-1.jpg
          79 kB

        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
              mesrine Eduardo Gonzalez
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: