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

[Regr: 6.3.1->6.3.2] MouseArea stays pressed after double click on touch screen

    XMLWordPrintable

Details

    • Android, iOS/tvOS/watchOS, Linux/X11, Windows
    • d7fac6923 (dev), 398926db4 (6.5), 35b551118 (dev), b25c4d6a0 (6.6), ff5baf76e (6.5.2), 226ca47dd (6.5)

    Description

      1. If, using the following code, you tap your finger quickly (touch screen) on the green rectangle (to trigger double click) mouse area hangs (stays in pressed state and can no longer be used):

      import QtQuick
      import QtQuick.Window
      import QtQuick.Controls
      
      Window {
          width: 640
          height: 480
          visible: true
      
          Rectangle {
              anchors.fill: parent
              color: mouseArea.pressed ? "red" : "orange"
      
              Popup {
                  visible: true
                  closePolicy: Popup.NoAutoClose
                  width: 200
                  height: 200
                  contentItem: MouseArea {
                      id: mouseArea
      
                      anchors.fill: parent
                      onClicked: console.debug("onClicked")
                      onDoubleClicked: console.debug("onDoubleClicked")
                      onPressed: console.debug("onPressed")
                      onReleased: console.debug("onReleased")
                      onPressAndHold: console.debug("onPressAndHold")
                      onCanceled: console.debug("onCanceled")
                  }
                  background: Rectangle {
                      color: "green"
                  }
              }
          }
      } 

      2.  Similar freezing of mousearea in pressed state can be achieved even if it is very simple code:

       

      import QtQuick
      import QtQuick.Window
      import QtQuick.Controls
      
      Window {
          width: 640
          height: 480
          visible: true
      
          Rectangle {
              anchors.fill: parent
              color: mouseArea.pressed ? "red" : "orange"
      
              MouseArea {
                  id: mouseArea
      
                  anchors.fill: parent
                  onClicked: console.debug("onClicked")
                  onDoubleClicked: console.debug("onDoubleClicked")
                  onPressed: console.debug("onPressed")
                  onReleased: console.debug("onReleased")
                  onPressAndHold: console.debug("onPressAndHold")
                  onCanceled: console.debug("onCanceled")
              }
          }
      } 

      In this case, it is best to quickly alternate tapt with two fingers to provoke this situation.

      It looks like released will be not triggered and this goes into press and hold state (See logs for more information).

      It is worth noting that the fingers were tapped quickly and there is no hold there. 

      This error can prevent the execution of critical functionality and is not particularly difficult to provoke.

      This is also a regression - in Qt 6.3.1 these problems do not occur.

       

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-112434
          # Subject Branch Project Status CR V

          Activity

            People

              srutledg Shawn Rutledge
              permotion88 Karol Polak
              Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes