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

QTableView: Word wrapping and resizing rows do not play along

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • Not Evaluated
    • 5.12.1
    • 5.11.1
    • Widgets: Itemviews
    • None
    • Linux/X11
    • 25231c40489e54d57998fa44385ad832cc32b30d

    Description

      I am using a QTableView with word wrapping enabled and rows configured to resize to content automatically.

      The view does NOT update the row height when columns are manually resized in a way that a cell changes from single-line text to double-line text (or vice versa).

      The following line works around the problem:

      CHECK_TRUE(connect(ui->tableView->horizontalHeader(), SIGNAL(sectionResized(int, int,
      int)), ui->tableView, SLOT(resizeRowsToContents())));

      However it seems strange that the above does not work out of the box. Is that behavior a bug?

      Attachments

        Issue Links

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

          Activity

            People

              chehrlic Christian Ehrlicher
              silicomancer Bernhard Lindner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes