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

TapHandlers in flickable block flicking on touch screen

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS, Windows
    • 1e1674849a89db54cdbcc4e995300e3ec1624c3a (qt/qtdeclarative/dev) f03615260cf6bba41393a700ca1cc58ce8742dba (qt/qtdeclarative/6.0)

    Description

      With the example code:

      Flickable {
              anchors.fill: parent
              contentWidth: flow.width
              contentHeight: flow.height
              clip: true
      
              Flow {
                  id: flow
      
                  spacing: 10
                  width: 2500
      
                  Repeater {
                      model: 2000
      
                      Rectangle {
                          id: rectangleButton
      
                          implicitWidth: 100
                          implicitHeight: 50
                          color: tapHandler.pressed ? "orange" : "grey"
      
                          Text {
                              anchors.centerIn: parent
                              text: modelData
                          }
                          TapHandler {
                              id: tapHandler
      
                              gesturePolicy: TapHandler.ReleaseWithinBounds
                              onTapped: console.debug("Tapped!")
                          }
                      }
      
      //                Button {
      //                    id: normalButton
      
      //                    text: "%1".arg(modelData)
      //                    onClicked: console.debug("Clicked!")
      //                }
                  }
              }
          }
      

      if you press on TapHandler and drag on touch screen (with mouse all works correctly) it happens that the flick is impossible. This does not happen always but quite often. The easiest way to get this error is by starting the drag by always pressing the same TapHandler.

      An analogous code works if "rectangleButton" is commented out and "normalButton" code is active.

       

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              permotion88 Karol Polak
              Jarko Vihriälä Jarko Vihriälä
              Votes:
              9 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: