Qt World Summit: Submit your Presentation

Pinch to zoom using PinchHandler and Flickable

  • So I would like to create a simple zoomable image which the user can scale by pinch and I would also like the user to be able to scroll the zoomed image. There are some example on how this can be done (the solutions aren't really clean) with a PinchArea and a Flickable, but I would like to use PinchHandler. I have tried this:

       id: flickable
       contentWidth: image.width; contentHeight:image.height
       interactive: !pinch.active
       source:"source.png"; width:500; height:600
       PinchHandler{id: pinch} // I disable rotation

    This allows me to zoom the image however, I cannot flick the image when zoomed.
    So I am able