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

Rotated flickable decelerates in wrong direction



    • Linux/Yocto, macOS
    • 8068bde891 (qt/qtdeclarative/dev) 8068bde891 (qt/tqtc-qtdeclarative/dev) 71660c9700 (qt/qtdeclarative/6.3) 71660c9700 (qt/tqtc-qtdeclarative/6.3) 71660c9700 (qt/tqtc-qtdeclarative/6.3.1) e9f1881c0d (qt/tqtc-qtdeclarative/6.2)



      We have an touch screen embedded device where the screen is installed upside down at manufacturing.  To work around this, we do a rotation transform in our main QML file.  The below code worked fine in Qt5, but in Qt 6.2.2, it seems that the deceleration of a Flickable occurs in the untransformed rotation, opposite to how the Flickable was dragged.  I have seen this behavior on both macOS and our Yocto distro.

      An example is shown below.  If you slowly scroll the window it behaves as expected, but if you drag quickly and let go, you will bounce back to where you started the drag.

      We have been using the technique below since Qt 5.6.  Is this even the correct way we should be working around the screen orientation, or is there a better way in Qt to indicate that the screen is inverted?


      import QtQuick 2.15
      import QtQuick.Window 2.15
      import QtQuick.Layouts 1.15
      Window {  
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
        Item {
          anchors.fill: parent
          rotation: 180
          Flickable {
            anchors.fill: parent 
            contentHeight: column.height
            ColumnLayout {
              id: column
              width: parent.width
              Repeater {
                model: 255
                delegate: Rectangle {
                  Layout.fillWidth: true
                  Layout.preferredHeight: 50
                  color: "gray"
                  width: parent.width
                  Text {
                    anchors.centerIn: parent
                    text: index



        Issue Links

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



              srutledg Shawn Rutledge
              davewilcoxson Dave Wilcoxson
              0 Vote for this issue
              3 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes