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

QGraphicsTextItem: Width of HTML list item in table constrained when setTextWidth set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.5.2
    • GUI: Text handling
    • None
    • All

    Description

      When calling setTextWidth on a QGraphicsTextItem that contains a multi-level HTML list that is wrapped in tables, the width of an indented list item will become constrained by another indented list item further down (see with_setTextWidth.png).

      This does not occur if setTextWidth is not set (see no_setTextWidth.png), nor when the HTML string being used is input into an HTML editor (see html_editor_example.png). Putting a high enough value in setTextWidth to fit all the text does not appear to have any effect.

      PySide6 example script included in qgraphicstextitem_html_setTextWidth.zip. Commenting out the call to setTextWidth shows the difference in behaviour.

      Note: Could QTBUG-37185 be in some way related? It also involves text display issues when setTextWidth is called and rich text is set.

      Attachments

        1. with_setTextWidth.png
          28 kB
          Karen Tam
        2. no_setTextWidth.png
          25 kB
          Karen Tam
        3. html_editor_example.png
          58 kB
          Karen Tam
        4. qgraphicstextitem_html_setTextWidth.zip
          0.9 kB
          Karen Tam

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              karen.tam@autodesk.com Karen Tam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes