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

New TableView in ScrollView reports wrong content size

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 5.12.1
    • 5.12.0 Beta 3
    • Quick: Controls 2
    • None
    • Windows

    Description

      I tried the new TableView by using the example code in the documentation. I add the TableView to a ScrollView to make it scrollable.

      When I started the app the ScrollBars were not visible, which indicates that the content size was not setup properly. Then I called forceLayout() in Component.onCompleted and the ScrollBars appeared. But after resizing the app window the ScrollBars suddenly indicated that the content can not be scrolled.

      I printed the contentWidth and contentHeight of the TableView on every change and I saw that they toggled between 0 and its true size during a window resize, but also on app start.

       

      I reproduced it on Windows 10 and on Linux (Fedora 28) in a virtual machine with the attached project.

      Attachments

        1. simpler.qml
          0.9 kB
        2. tableview_v2.zip
          3 kB

        Issue Links

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

          Activity

            People

              richard Richard Moe Gustavsen
              voodoo66 Voodoo Master
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes