Important: Please read the Qt Code of Conduct -

[SOLVED] PinchArea on top of a Flickable

  • [solved] I found that wrapping the Flickable inside a PinchArea solved the problem.


    I am trying to make a PinchArea inside a Flickable and for some reason it does not work most of the time. I have managed to get it working (randomly)... Randomly I pinch and it worked once but I cannot get it to work now...!
    I have a map which is shown using an Image and the Flickable works fine but for some reason I cannot get the PinchArea to work with the Flickable.

    Here is a section of code:

    Flickable {
         anchors.fill: parent 
         id: flick
         width: yateleySchool.width; height: yateleySchool.height
         contentWidth: map.width; contentHeight: map.height
         contentX: 3634/2-yateleySchool.width/2;
         contentY: 2225/2-yateleySchool.height/2;
         PinchArea {
             anchors.fill: parent
             id: pinch
             onPinchStarted: {
                 flick.interactive = false
                 slide.value = pinch.scale
             onPinchUpdated: {
                 slide.value = pinch.scale
             onPinchFinished: {
                 slide.value = pinch.scale
                 flick.interactive = true
         //boundsBehavior: Flickable.DragOverBounds;
    Image {
        id: map
        source: "file:///" + path + "/images/1of18.Ground.Floor.Layout.Colours.Labels.png"

    and so on...

Log in to reply