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

WheelHandler on a 'property' doesn't work well together with a Behavior on this property

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.4, 6.3.2, 6.4.1
    • None
    • MacBook Pro 13-inch, M1, 2020, macOS 13.0.1 Ventura
    • macOS

    Description

      WheelHandler on a 'property' doesn't work together with a Behavior on this property.

      Sample code:

      import QtQuick
      
      Window {
          width: 640
          height: 480
          visible: true
      
          Rectangle {
              id: redRect
              anchors.centerIn: parent
              width: 200
              height: 200
              color: 'red'
      
              WheelHandler {
                  acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
                  property: 'scale'
                  onWheel: (event) => {
                      console.log('angleDelta: ' + event.angleDelta + ', pixelDelta: ' + event.pixelDelta)
                  }
              }
      
              Behavior on scale {
                  NumberAnimation {
                      duration: 400
                      easing.type: Easing.InOutCubic
                  }
              }
          }
      }
      

       
      Steps to reproduce:
      1. Build and run sample above
      2. Try to scale red rectangle via scroll gesture on touchpad
       

      Reproduced at least on MacBook with touchpad. It's not reproduced for me with mouse wheel on Windows.

      Attachments

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            studiosus Vladimir Belyavsky
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: