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

PathView does not work properly when you break flicking by mouse click

    XMLWordPrintable

Details

    • Windows

    Description

      Example code using Tumbler, which uses PathView internally:

      import QtQuick 2.12
      import QtQuick.Controls 2.5
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
      
          Tumbler {
              id: tumbler
      
              anchors.centerIn: parent
              delegate: Label {
                  text: "%1".arg(modelData)
                  opacity: 1.0 - Math.abs(Tumbler.displacement) / (Tumbler.tumbler.visibleItemCount / 2)
                  horizontalAlignment: Text.AlignHCenter
                  verticalAlignment: Text.AlignVCenter
                  color: Tumbler.tumbler.currentIndex === index ? "blue" : "black"
              }
              model: 200
      
              Rectangle {
                  anchors.verticalCenter: parent.verticalCenter
                  height: 2
                  width: parent.width
                  color: tumbler.moving ? "red" : "blue"
              }
          }
      }
      

      Steps to reproduce the problem:

      1. Flick the tumbler with mouse

      2. Before the flicking ends, press the mouse on the tumbler to stop the tumbler in the selected place

      3. Without releasing the mouse button, try drag in the tumbler

      Results:

      1. Drag is impossible without releasing the mouse button and clicking the tumbler again

      2. When you release the mouse button, the current item does not move to the center, and the tumbler property moving is still true

       

      The above problems do not occur if you use the tumbler with touch on the touch screen.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes