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

Flickable sending "flickStarted" signal at the end of a pan operation while we don't intend to flick

    XMLWordPrintable

Details

    • 20f8357c8ee570f57091e20b9c0a9a1455dc1e8d

    Description

      Hi,

      I am using Flickable element in the qml file for supporting both pan and flick. My sample code is as follows:

      import QtQuick 1.1
      
      Rectangle
      {
          id: mainRect; height: 640; width: 360
          Flickable {
              id: flick; width: 360; height: 540; anchors.fill: mainRect
              contentWidth: 3 * width
              contentHeight: 3 * height
      
              onMovementStarted: { console.log( "Flickable::OnMovementStarted", flick.contentX, flick.contentY) }
              onMovementEnded: { console.log( "Flickable::OnMovementEnded", flick.contentX, flick.contentY) }
              onFlickStarted: { console.log( "Flickable::OnFlickStarted HV = ", horizontalVelocity, " VV = ", verticalVelocity ) }
              onFlickEnded: { console.log( "Flickable::OnFlickEnded" ) }
      
              Rectangle { parent: flick; anchors.fill: parent; color: "green" }
              PinchArea { id: pinchArea; parent: flick; anchors.fill: parent }
              MouseArea { id: mouseArea; parent: flick; anchors.fill: parent }
          }
      }

      I observed that when I do a pan gesture, at the end of the pan gesture, I can see triggering of "flickStarted" signal some times. This is observed when I do pan with some velocity. I printed the velocities when this signal is hitting and found that they are below 100 units.

      See the concerned debug output here:

      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementStarted 0 0
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementEnded 0 122
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementStarted 0 122
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementEnded 0 302
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementStarted 0 302
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnFlickStarted HV =  -3.775257110595703  VV =  47.01399230957031
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnFlickEnded
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementEnded 0 412
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementStarted 0 412
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnFlickStarted HV =  -13.342403411865234  VV =  72.5542221069336
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnFlickEnded
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementEnded 0 497
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementStarted 0 497
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnFlickStarted HV =  -15.24268627166748  VV =  85.92601776123047
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnFlickEnded
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementEnded 0 561
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementStarted 0 561
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnFlickStarted HV =  -25.287673950195312  VV =  73.2173080444336
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnFlickEnded
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementEnded 0 667
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementStarted 0 667
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementEnded 0 769
      
      
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementStarted 0 769
      ProgramOutputConsoleLogger: [Qt Message] Flickable::OnMovementEnded 0 861
      

      So, my questions are:

      1. Is there any minimum threshold velocity defined for "flickStarted" to trigger? If so, what is that?
      2. Is there any limiting velocity defined for pan gesture?
      3. This seems to be a potential bug. Can you please validate this?

      Thanks & Regards,
      BalaSubrahmanyam Varanasi

      Attachments

        1. PanGestureTestApp.zip
          47 kB
        2. QTBUG-19933.qml
          0.8 kB
        3. QTBUG-19933.qml
          0.8 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            baluvaranasi BalaSubrahmanyam Varanasi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes