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

align="center" escapes <div> when using QTextBrowser

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.9.1
    • GUI: Text handling
    • None
    • MacOS Sequoia 15.5
    • macOS

      This appears to be the same (unresolved) bug QTBUG-3866 from 16 years ago.

      The following HTML is rendered incorrectly by QTextBrowser:

      left aligned 1
      <div align="center">centered</div>
      <br></br>
      left aligned 2

      Text "left aligned 2" is centered which it should not be. I guess the alignment in <div> is still active when it should revert to left alignment.

      The above renders fine in a browser.

      Demo project attached.

        1. Bugs.pro
          0.2 kB
        2. main.cpp
          0.5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            esabraha Eskil Abrahamsen Blomfeldt
            chrisv Chris von Toerne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes