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

TapHandlers in flickable block flicking on touch screen

XMLWordPrintable

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

      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.

       

        1. TapHandlerAndFlickableLog.txt
          80 kB
          Karol Polak
        2. TapHandlerAndFlickable.zip
          3 kB
          Karol Polak
        3. qtbug75223-qmltestcase.tar.gz
          55 kB
          Joni Poikelin
        4. qtbug75223.zip
          2 kB
          Andy Shaw
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved: