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

[Regr: 6.3->6.4] MouseArea stays pressed after double click on touch screen

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • 6.5.1
    • 6.4.3, 6.5.0 RC, 6.5.0
    • None
    • Microsoft Windows 10 (10.0.19045 Build 19045)
      DELL XPS 15 7590 with Touch Screen
    • Android, iOS/tvOS/watchOS, Windows

    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

        1. MouseAreaPopupTouchProblem_log.txt
          17 kB
          Karol Polak
        2. MouseAreaPopupTouchProblem.zip
          2 kB
          Karol Polak
        3. MouseAreaTouchProblem_log.txt
          129 kB
          Karol Polak
        4. MouseAreaTouchProblem.zip
          2 kB
          Karol Polak

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            permotion88 Karol Polak
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: