Uploaded image for project: 'Qt for MCUs'
  1. Qt for MCUs
  2. QTMCU-330

anchors.bottom is not correctly followed by multi-line Text

    XMLWordPrintable

Details

    • Consumer team Sprint 2024/3.1, Consumer team Sprint 2024/3.2, Consumer team Sprint 2024/3.3, Consumer team Sprint 2024/3.4

    Description

      Code

      import QtQuick
      
      Rectangle {
          Row {
              anchors.fill: parent
              spacing: 50
      
              Text {
                  anchors.bottom: parent.verticalCenter
                  text: "1 line"
              }
              Text {
                  anchors.bottom: parent.verticalCenter
                  text: "2\nlines"
              }
              Text {
                  anchors.bottom: parent.verticalCenter
                  text: "3\n(Three)\nlines"
              }
              Text {
                  anchors.bottom: parent.verticalCenter
                  text: "1 line"
              }
          }
      
          Rectangle {
              width: parent.width
              height: 1
              anchors.verticalCenter: parent.verticalCenter
              color: "red"
          }
      }
      

       

      Expected Outcomes
      The bottoms of all 4 Texts have exactly the same vertical positions

       

      Actual Outcomes
      The bottoms of the multi-line Texts are lower than the bottoms of the single-line Texts

      Attachments

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

        Activity

          People

            paeglis Gatis Paeglis
            skoh-qt Sze Howe Koh
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes