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

Text with ElideRight set is elided too early

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.12.4
    • Fix Version/s: 5.13
    • Labels:
      None
    • Environment:
      Linux Xubuntu 18.04 LTS x64
    • Platform/s:
      Linux/X11
    • Commits:
      82247946b2733bcd5bb3740a31c7d38fb90f6ddd

      Description

      QML Text element cust a word that shouldn't be wrapped when the following properties are set:

      wrapMode: Text.WordWrap
      elide: Text.ElideRight
      maximumLineCount: 1

       

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Text {
              anchors.centerIn: parent
              height: 50
              width: 163
      
              text: "Hello World"
              font.pixelSize: 30
              verticalAlignment: Text.AlignVCenter
              horizontalAlignment: Text.AlignLeft
              wrapMode: Text.WordWrap
              elide: Text.ElideRight
              maximumLineCount: 1
      
              Rectangle {
                  anchors.fill: parent
                  color: "transparent"
                  border.width: 1
                  border.color: "black"
              }
          }
      }
      

        Attachments

        1. 2019-11-20 11-59-26.mkv
          316 kB
        2. QML_text_wordWrap.png
          QML_text_wordWrap.png
          7 kB
        3. Screenshot from 2019-11-20 11-10-41.png
          Screenshot from 2019-11-20 11-10-41.png
          30 kB
        4. Screenshot from 2019-11-20 11-42-18.png
          Screenshot from 2019-11-20 11-42-18.png
          9 kB
        5. with_elide.png
          with_elide.png
          2 kB
        6. without_elide.png
          without_elide.png
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            olyubimov Oleg Lyubimov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes