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

SwipeView interactive:false blocks touch events

XMLWordPrintable

    • Linux/Other display system

      On a standard Ubuntu desktop, setting QML SwipeView's interactive property to false causes mouse events to be ignored, and propagate through the SwipeView (i.e., SwipeView becomes invisible to mouse events). In the attached example, pressing the SwipeView area will cause the background to blink.

      On a touch screen however, touching/pressing the SwipeView with interactive: false blocks the events, (i.e., the events are not propagated so the SwipeView is not transparent to mouse events).

      This seems unintentional; the interactive:false behavior of propagating the event is a very desirable feature as it allows interacting with elements behind the swipeview. The current touch behavior makes this impossible.

      import QtQuick 2.7
      import QtQuick.Controls 2.2
      
      Rectangle {
          width: 500
          height: 500
          color: mouseArea.containsPress ? "#ffff00" : "#00ffff"
      
          MouseArea {
              id: mouseArea
              anchors.fill: parent
          }
      
          SwipeView {
              anchors.fill: parent
              anchors.margins: 50
              interactive: false // <-- should propagate!
      
              Rectangle {
                  color: "#ff0000"
              }
              Rectangle {
                  color: "#00ff00"
              }
              Rectangle {
                  color: "#0000ff"
              }
          }
      }
      
      

      In our test setup, we have used a standard touch screen from Acer T272HUL, with HDMI and USB connected to a desktop PC. But this issue can be reproduced on target embedded devices as well.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            srutledg Shawn Rutledge
            andrhans Andreas Aardal Hanssen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes