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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.5.3, 6.8.3, 6.10.0
    • None
    • MacBook Pro 13-inch, M1, 2020, macOS 13.0.1 Ventura
    • macOS

      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.

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

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

              Created:
              Updated:

                There are no open Gerrit changes