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

[Reg 5.5 -> 5.6] TableView with non-integral header's height loops endlessly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.6.0 RC
    • 5.6.0 Beta
    • Quick: Controls 1
    • None
    • Windows 10, Fedora linux
    • qtdeclarative: abf030cead015752b22774b46e290e3a5e4ef4e4

    Description

      Reproduction:
      Run "TableView Example" with custom headerDelegate in TableViewStyle (notice height: 20.6):

      TableView {
          (...)
          style: TableViewStyle {
              headerDelegate: Rectangle {
                  height: 20.6
                  Text {
                      anchors.fill: parent
                      text: styleData.value
                  }
              }
          }
      }
      

      Program loops endlessly immediately after starting, gui is unresponsive.

      With additional debug code:

      TableView {
          (...)
          Component.onCompleted: {
              flickableItem.contentYChanged.connect(function () {
                      console.debug("contentY", flickableItem.contentY);
              });
          }
      }
      

      we can see that flickableItem.contentY oscillates between negative header's height and its rounded value, so in this case between -20.6 and and -21.

      Any fraction between 0.5 and 1 causes infinite loop immediately after table creation. Fractions between 0 and 0.5 sometimes cause loop after scrolling/filtering.

      Full modified example main.qml attached.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              kpiekutowski Krzysztof Piekutowski
              Votes:
              5 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes