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

QTextTabel: column width changes when merging other rows

    XMLWordPrintable

Details

    • Windows
    • 9538c7ca73e75ab8219e43b36b49200f27164dbb (qt/qtbase/dev) 4716a9693d7afb2add8e88968acd8c8fa2b51732 (qt/qtbase/6.2) f69fc16967056b39dd7ead7172926ecc5e92e08b (qt/tqtc-qtbase/5.15)

    Description

      When merging row [1]  into one cell the width of column 1 gets changed:

      becomes

      Code: 

       

      QTextDocument* td =ui->te->document();
      td->clear();
      QTextCursor tc(td);

      tc.movePosition(QTextCursor::MoveOperation::End);
      QTextTable* table =tc.insertTable(3, 3);

      int row =0;
      QTextTableCell c00 =table->cellAt(row, 0);
      QTextTableCell c01 =table->cellAt(row, 1);
      QTextTableCell c02 =table->cellAt(row, 2);

      c00.firstCursorPosition().insertText(QStringLiteral("Header 0"));
      c01.firstCursorPosition().insertText(QStringLiteral("Header 1"));
      c02.firstCursorPosition().insertText(QStringLiteral("Header 2"));
      // this goes bad
      table->mergeCells(1,0, 1, 3);
       

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-95240
          # Subject Branch Project Status CR V

          Activity

            People

              vhilshei Volker Hilsheimer
              hom Holger Mairon
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes