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

Long press interferes with MouseArea on Android

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.1.0 Beta 1
    • Fix Version/s: 5.1.0 RC1
    • Labels:
      None
    • Environment:
      Samsung Galaxy S2
    • Platform/s:
      Android

      Description

      When holding my finger down on a MouseArea on my S2, the press is "cancelled" after a second. If I touch the MouseArea and then drag my finger away from the initial position, the press is not cancelled as expected.

      import QtQuick 2.0
      
      Rectangle {
          width: 480
          height: 300
      
          property int value: 0
      
          Behavior on value { NumberAnimation { duration: 1000 } }
      
          Text {
              id: valueText
              text: value
              font.pixelSize: 50
          }
      
          Rectangle {
              id: rect
              anchors.bottom: parent.bottom
              width: parent.width
              height: parent.height / 2
              color: mouseArea.pressed ? "darkgrey" : "grey"
      
              Text {
                  anchors.centerIn: parent
                  text: "Click me"
                  font.pixelSize: 50
              }
      
              MouseArea {
                  id: mouseArea
                  onPressed: value = 100
                  onReleased: value = 0
                  anchors.fill: parent
              }
          }
      }
      

      See the attached video.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              tvete Paul Olav Tvete
              Reporter:
              mitch_curtis Mitch Curtis
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes