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

TableView 2 requires two forceLayout calls to display hidden rows AND size them correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.13.2, 5.14.0 Alpha
    • 5.13.0
    • Quick: Controls 2
    • None
    • Windows 10, 5.13 Qt Creator
    • All
    • da04b1d716617fbe4a2d93dc5a51f38dbd03a5b8 (qt/qtdeclarative/5.13)

    Description

      TableView 2 allows users the ability to set both sizes and visibility within a TableView using ColumnWidthProviders and RowHeightProviders. Returning 0 from a rowHeightProvider will hide the row from view. Returning -1 from a rowHeightProvider should display a row and fall back to calculating the width of the item column.

      In practise this does not happen if a columnWidthProvider is set as well as a rowHeightProvider. Displaying a previously hidden element with a provider will work following a forceLayout(), however columns will not be sized correctly. A second call to forceLayout() correctly sizes the contents.

      It appears if you unset columnWidthProvider it functions as expected (Perhaps a function ordering error?)

      See attached example. Switch visible rows first, then force a layout. The new rows will be visible but not sized correctly. Then force a layout a second time, the new columns will be sized correctly.

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            baz Seb Horsewell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes