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

fix docs: PinchArea : maximumScale etc. apply to pinch.target not to onPinchUpdated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.3.0 Beta1
    • None
    • Windows 7 64bits
      Qt Android for Windows 32-bit 5.3.0-beta1 (Enterprise)
      Device : Samsung Galaxy S3 (4.3)
    • 3e5756e9e72b53f496223088bc31c9fb93e864e5

    Description

      The limitations in PinchArea (for example pinch.maximumScale) does nothing on update events. Events are not limitated by the values as said in doc :"pinch.minimumScale and pinch.maximumScale limit the range of the Item::scale property."

      It's same thing for maximumX/Y and rotation.

      Having that :

      import QtQuick 2.2
      import QtQuick.Window 2.1
      
      Window {
          visible: true
          color:"black"
          PinchArea
          {
              id: pinchy
              enabled: true
              anchors.fill: parent
              pinch.dragAxis: Pinch.XandYAxis
      
              pinch.minimumScale: 0.5
              pinch.maximumScale: 1
              pinch.minimumX: 50
              pinch.maximumX: 100
              pinch.minimumY: 50
              pinch.maximumY: 100
              pinch.minimumRotation : 0
              pinch.maximumRotation: 90
              onPinchUpdated: { console.log(pinch.center.x + " "+ pinch.center.y +" " +pinch.scale +" " +pinch.rotation);
              }
          }
      }
      

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            julienw Julien W
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes