Pinch/spread to zoom uses wrong centerpoint

• Mar 16, 2017 - 19:47
Reported version
S5 - Suggestion

When pinching to zoom the canvas using 2.1 nightly on a touch device like Surface Pro, the zooming does often not act as expected. Instead of keeping the point between the two fingers fixed on the same place, instead it keeps another point fixed. Sometimes this is a point like the top right point of a frame which is selected, or the top right point of a selection box.

This is not the case for master (MS 3) which work as expected.

Could we consider to backport this behaviour?


I see the same behavior with a touchpad on MacOSX . Hopefully fixing it here will also fix it on an actual touch device.

In master it works because we use Qt 5.6/5.8 and they report correctly the pinch centerpoint. It's not the case for 2.1 and Qt 5.4. So we can't backport anything.

Instead of relying on this centerpoint, I tried to use the "hotspot" of the QGesture and it seems to do the "right thing" on Mac. Let's test on a windows touch screen.

Reported version 2.2 2.1

Is 2.0.3 also affected or was this a 2.1 regression? I'm assuming it's also there in 2.0.3.

It doesn't work correctly in 2.0.3 with the mac touchpad, and thomas reported privately that it doesn't work correctly in 2.0.3 on the surface pro he was tested on.

Okay. :-)

@Jojo, well, for users looking for changes in 2.1 it would be confusing to see things listed as fixed by 2.1 in the release notes which they never experienced as broken in 2.0.3, would it not?

I think there's a misunderstanding. Yes, pinch-to-zoom works in 2.0.3, but "Instead of keeping the point between the two fingers fixed on the same place, instead it keeps another point fixed." So this fix is brand-new to 2.1.

Missed this discussion, but wanted to add for the record it also affects scroll by mouse wheel and is thus that much more awesome :-) And I can confirm that in both cases - pinch to zoom as well as mouse wheel - it did *not* work as expected in 2.0.3. So it's not a regression, just soemthing that never worked well and now does, so definitely worth mentioning in release notes.