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: None
    • Labels:
      None
    • Environment:
      Linux Xubuntu 18.04 LTS x64
    • Platform/s:
      Linux/X11

      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

        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:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes