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

TableView's contentY strange behaviour when using rowHeightProvider and contentHeight

    XMLWordPrintable

Details

    • Linux/X11

    Description

      When implementing a custom scrolling algorithm for TableView with rows of varying heights, rowHeightProvider is used to manage these differing row heights. To improve performance and ensure correct scrollbar behavior, contentHeight is explicitly calculated and set according to documentation guidelines.

      An issue arises in certain cases when row heights change: the expected contentY value does not function correctly. The attached example project reproduces the problem, which can be tested as follows:

      1. First, click "Jump to end"—this should work as expected.
      2. Next, click "Resize rows" to adjust the row heights and update contentHeight (without scrolling to the top).
      3. Clicking "Jump to end" again no longer works correctly. Although contentHeight has been updated, calculating contentY does not yield the expected behavior.
      4. Using the scrollbar and flicking still allows scrolling down as expected.
      5. If TableView is scrolled back to the top, an internal adjustment occurs, and the "Jump to end" functionality works as expected once more.

      Attachments

        1. QTBUG-130653.zip
          3.59 MB
          Chakib Boutaghane
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            richard Richard Moe Gustavsen
            chakib Chakib Boutaghane
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes