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

Swipe Gestures Do Not Work Properly in PathView When Touching Overlapping Elements

    XMLWordPrintable

Details

    • Linux/X11, Linux/Yocto, Windows

    Description

      Swipe gestures in PathView do not function as expected when the swipe starts on overlapping interactive elements, such as a Button. Reproduces on Yocto/Linux/Windows with a touchscreen.

      import QtQuick
      import QtQuick.Window
      import QtQuick.Controls
      
      ApplicationWindow {
          property int screenWidth: 480
          property int screenHeight: 272    
          visible: true
          title: qsTr("Hello World")
          width: screenWidth
          height: screenHeight    
          PathView {
              anchors.fill: parent
              snapMode: PathView.SnapOneItem
              preferredHighlightBegin: 0.5
              preferredHighlightEnd: 0.5
              pathItemCount: 2
              cacheItemCount: count - pathItemCount
              highlightRangeMode: PathView.StrictlyEnforceRange
              model: 3
              delegate: Rectangle {
                  width: screenWidth
                  height: screenHeight
                  color: {
                      if (index === 0)
                          return "blue"
                      if (index === 1)
                          return "gray"
                      if (index === 2)
                          return "green"
                  }
                  Button {
                      anchors.centerIn: parent
                      width: 200
                      height: 100
                      text: "ClickMe"
                  }
              }
              path: Path {
                  startX: -0.5 * screenWidth
                  startY: screenHeight / 2   
               
                  PathLine {
                      x: 1.5 * screenWidth
                      y: screenHeight / 2
                  }
              }
          }
      } 

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            hmi hmi ui
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes