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

Arabic text is clipped in QLabel, and QGroupBox, and QTabWidget

    XMLWordPrintable

    Details

    • Commits:
      098d87c63fb638db619808af8b86c043354f62c5 (5.8), b705fc45c454a9cecbcaa7f99e4963d94da9b86c (5.6)

      Description

      when writing arabic text in QLabel and setting Horizontal Size policy to Maximum ( or use a horizontal spacer besides the control) the text is clipped !

      as far as I have checked, it usually happen when a text ending with "ص" or "ل" or "ف" .

      sometimes that happens with English text as well, but I can't remember how.

      Attacked screen shots of the problem, and the sample code I wrote to demonstrate the problem.

      Edit 1:
      I tried to trace the problem, looks like QFontMetrics.width(), and boundingRect() returns wrong width for the given arabic text. the values are less than the values returned from those methods back in Qt 5.2 and lower versions.

        Attachments

        1. compiled with 5.2.png
          compiled with 5.2.png
          12 kB
        2. compiled with 5.7.png
          compiled with 5.7.png
          11 kB
        3. designer.png
          designer.png
          13 kB
        4. qt 4.7.4.png
          qt 4.7.4.png
          10 kB
        5. qt 5.7.0 RC.png
          qt 5.7.0 RC.png
          8 kB
        6. runtime.png
          runtime.png
          9 kB
        7. runtime 2.png
          runtime 2.png
          3 kB
        8. tabwidget.png
          tabwidget.png
          3 kB
        9. test app2.zip
          7 kB
        10. untitled.rar
          2 kB

          Issue Links

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

            Activity

              People

              Assignee:
              esabraha Eskil Abrahamsen Blomfeldt
              Reporter:
              ahmedb Ahmed Bedeer
              Votes:
              7 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes