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

MouseArea recieve doubleClick instead of click on touch screen

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.2.0
    • None
    • Microsoft Windows 7 (6.1) 64-bit Service Pack 1 (Build 7601)
      Intel Core i7 2600K
      NVIDIA GeForce GTX 570
      Qt 5.2.0
      QtCreator 3.0.0

    Description

      If you have more than 1 MouseArea in your QML file and tap on first MousrArea then quickly tap on another the second MouseArea receive doubleClick instead click.

      main.qml
      import QtQuick 2.0
      
      Rectangle {
          width: 300
          height: 250
      
          Grid {
              columns: 6
      
              Repeater {
                  model: 30
      
                  Rectangle {
                      width: 50
                      height: 50
      
                      color: Qt.rgba(Math.random(1), Math.random(1), Math.random(1))
      
                      MouseArea {
                          objectName: index.toString()
                          anchors.fill: parent
      
                          onPressed: console.log(objectName, "onPressed")
                          onClicked: console.log(objectName, "onClicked")
                          onDoubleClicked: console.log(objectName, "onDoubleClicked")
                      }
                  }
              }
          }
      }
      

      If you do it by mouse it will be OK:

      7 onPressed
      7 onClicked
      8 onPressed
      8 onClicked
      

      But on touch screen you will receive something like that:

      7 onPressed
      7 onClicked
      8 onPressed
      8 onDoubleClicked
      

      Attachments

        1. qmlscene_mouseevtfilter.diff
          1 kB
        2. qtbug39322_log.txt
          15 kB
        3. qtbug39332_dbl_click_stacktrace.txt
          19 kB
        4. qtbug39332.qml
          0.7 kB

        Issue Links

          Activity

            People

              srutledg Shawn Rutledge
              zvava Alexander
              Votes:
              8 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: