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

Incorrect doubleClicked signal from MouseArea under Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.7.0, 5.7.1
    • None
    • windows 7, ubuntu 16.04, android M

    Description

      While testing out an application on android I noticed something funky going on. A double click event handler has been triggering without any double clicks occurring on that particular item.

      Trying to isolate the issue I discovered that pretty much every chain of clicks rapid as a double click on regardless what two objects would cause the second click on the second object to register as a double click, when in fact it is just a single click.

      Bellow is an example consisting of a row of 3 randomly colored rectangles, each one with a mouse area inside of it. The double click of each mouse area is rigged to set the parent rectangle's color to a different random color. Clicking rapidly two different rectangles under android triggers a double click and a color change for the second. This does not happen on windows or ubuntu linux.

      Window {
        id: main
        visible: true
        width: 400
        height: 400
        title: qsTr("Hello World")
      
        Row {
          Rectangle {
            width: main.width * .33
            height: main.height
            color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
            border.color: "black"
            border.width: 2
            MouseArea {
              anchors.fill: parent
              onDoubleClicked: parent.color = Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
            }
          }
          Rectangle {
            width: main.width * .33
            height: main.height
            color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
            border.color: "black"
            border.width: 2
            MouseArea {
              anchors.fill: parent
              onDoubleClicked: parent.color = Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
            }
          }
          Rectangle {
            width: main.width * .33
            height: main.height
            color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
            border.color: "black"
            border.width: 2
            MouseArea {
              anchors.fill: parent
              onDoubleClicked: parent.color = Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
            }
          }
        }
      }
      

      The issue is extremely invasive and disruptive to user experience, as quick application interactions keep causing the the incorrect double click signals and triggering the wrong and unintended handler code.

      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
              dgo dgo
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes