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

TableView simple columnWidthProvider breaks content positioning

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.6.0
    • None
    • Windows

    Description

      TableView incorrectly updates it's contentX property when used with the simplest possible columnWidthProvider after columns are pooled and window is resized.

      I have attached a simple QML example file that can be used in a default Qt Quick project in QtCreator. The example is a copy of the TableView QML Model example given in the docs but adds the simplest possible columnWidthProvider (hard coded array of column values that don't change) and a Rectangle item to visualize contentX. This Rectangle is set-up like a very simple header container for a table view as I suspect this is a common real life use case where others may run into this issue.

      See attached GIF for walkthrough of how to reproduce:

      In the above gif you should see that the contentX does not return to zero after shrinking the window, scrolling to the right and full screening the window. The issue appears to get worse as I drag the TableView around after that point.

      I suspect there are other ways to reproduce this issue and full screening window may not be required but this sequence of steps reproduces the issue every time on my end.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            haiku Ollie Dawes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes