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

The first character of a line is cut off in QTextBrowser if the first space is non-breaking.

    XMLWordPrintable

Details

    • 15414257b3719f2c302cca26efe40f2b3caa115b

    Description

      There is html shown in QTextBrowser. The html contains nbsp entities and span tags to apply styles (bold/normal font). Now, when there is 'bold text, nbsp, and bold text' in the beginning of a line the first character is cut off. The text is shown correctly if the line break is anywhere else than before that bold text.

      This error showed up after change https://codereview.qt-project.org/#/c/88644/4 was applied.

      Also one curiosity is that the nbsp in the middle of bold text is using "normal font" (due to html layout issues), which is set with span tag. If the span tag is removed and the nbsp is bold, the problem is not reproducible.

      See the attached example. The 4th line says "4.8% een havo diploma" when it should be "64.8% een havo diploma". Resize the window to see the correct text.

      Tested on Windows 7 and Ubuntu 16.04.

      Attachments

        1. qtbug.PNG
          qtbug.PNG
          22 kB
        2. qtbug56714.zip
          1 kB
        For Gerrit Dashboard: QTBUG-56714
        # Subject Branch Project Status CR V

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            qtcomsupport Qt Support
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes