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

Elide doesn't work for multi-line text

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • Qt for MCUs 2.9
    • Qt for MCUs 2.8.1
    • QUL Team
    • None
    • Consumer team Sprint 2024/3.1

    Description

      The documentation for the elide property (https://doc.qt.io/QtForMCUs-2.8/qml-qtquick-text.html#elide-prop) states:

      If a text item contains multi-line text, it must have both width and height defined explicitly. Multi-line text supports Text.ElideRight only.

      But it seems it doesn't work:

      import QtQuick 2.15
      Rectangle {
          color: "#41CD52"
          width: 800
          height: 480
          Rectangle {
              anchors.fill: text
              color: "gold"
          }
          Text {
              id: text
              text: "Text\nTestTestTest"
              width: 60
              height: 100
              elide: Text.ElideRight
          }
      }
      

      Attachments

        1. test3.png
          test3.png
          44 kB
        2. screenshot-2.png
          screenshot-2.png
          74 kB
        3. screenshot-1.png
          screenshot-1.png
          66 kB
        4. image-2024-09-26-17-53-40-748.png
          image-2024-09-26-17-53-40-748.png
          5 kB

        Issue Links

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

          Activity

            People

              paeglis Gatis Paeglis
              srodal Samuel Rødal
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes