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

ListView with fixed header height in an OverlayHeader does not scroll

XMLWordPrintable

      Using a ListView like this:

      ListView {
              model: 100
              anchors.fill: parent
              header:  header: Text {
                  height: 48
                  width: parent.width
                  text: "List title"            
              }
              headerPositioning: ListView.OverlayHeader
      
              delegate: Item {
                  width: parent ? parent.width : 0
                  height: 48
                  Text {
                      text: "Item " + modelData
                  }
                  Rectangle {
                      anchors {
                          left: parent.left
                          right: parent.right
                          bottom: parent.bottom
                      }
                      height: 1
                      color: "black"
                  }
                  TapHandler {
                      onSingleTapped: console.log("tapped " + modelData)
                  }
              }
          }
      

      does not scroll via drag gesture. Wheel-scrolling works fine.
      If you either:

      • disable the TapHandler in the delegate
      • use the default headerPositioning
      • do not set a fixed height for the header

      the drag-scrolling works fine.

        1. Listview-bug.zip
          2 kB
          Tobias Bräutigam
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sami.shalayel Sami Shalayel
            tobiasb Tobias Bräutigam
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes