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

[PinchHandler] minimum/maximumScale are not functional

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • 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

      PinchHandler doesn't respect minimum/maximumScale.

      Code sample:

      import QtQuick
      
      Window {
          width: 640
          height: 480
          visible: true
      
          Rectangle {
              id: redRect
              anchors.centerIn: parent
              width: 200
              height: 200
              color: 'red'
      
              Text {
                  anchors.centerIn: parent
                  font.pixelSize: 18
                  text: parent.scale.toFixed(2)
              }
          }
      
          PinchHandler {
              target: redRect
              minimumScale: 0.5
              maximumScale: 1.5
          }
      }
      

      See video Screen Recording 2022-11-26 at 22.11.17.mov
      Reproduced at least on macOS with touchpad.

      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
              studiosus Vladimir Belyavsky
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes