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

List item numbers overflowing the visible area

XMLWordPrintable

    • macOS

      When applying a QTextListFormat with a very large start value (e.g. 12345678) to a list in either QTextEdit (C++) or TextEdit (QML), the list item number renders far outside the visible bounds of the editor. This causes layout issues, misalignment, and in some cases, the list number may not be visible at all.(See attached screen)

      Qml example:

      TextEdit {
          width: 400
          height: 200
          textFormat: Text.RichText
          text: "<ol start='12345678'><li>Item text</li></ol>"
      }

      Widgets example:

      QTextEdit *editor = new QTextEdit;
      QTextDocument *doc = new QTextDocument;
      editor->setDocument(doc);
      editor->setText("Item text");
      QTextCursor cursor(doc);
      QTextListFormat listFormat;
      listFormat.setStyle(QTextListFormat::ListDecimal);
      listFormat.setStart(12345678);
      cursor.createList(listFormat);
      editor->setWindowTitle("QTextDocument Example");
      editor->resize(400, 200);
      editor->show(); 

       

       

       

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            evgenpervenenko Evgen Pervenenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes