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

ListView with fixed header height in an OverlayHeader does not scroll

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes