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

Long press interferes with MouseArea on Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.1.0 RC1
    • 5.1.0 Beta 1
    • None
    • Samsung Galaxy S2
    • 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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: