October 20, 2010 by Frederik Gladhorn | Comments
Fixing bugs sometimes means changing behavior. The gesture framework is still pretty fresh in Qt. It made its first appearance in Qt 4.6, but only now with Qt 4.7 is it going to be used big time. Sadly we found this bug too late to integrate it into Qt 4.7.0, but it seems important enough to be in 4.7.1.
The pinch gesture has a property that represents the zoom factor. This used to be initialized with the value 0.0 and the total scale factor would be the sum of all scale factors... just like rotations, where the angle is added up.
Well, we admit, that was a bit of a thinking mistake. Scaling is a multiplicative property. So from Qt 4.7.1 on this horrible mistake has been fixed to give you easy to use zooming. We think this is so important that it needs to be in Qt now, since it's a behavior change and we want to enable Qt to be used on devices.
So if you have a picture and you want to use two fingers to scale it, now all you have to do to make the picture scaling follow the fingers is to multiply the scaling by QPinchGesture::scaleFactor() and you are good :)
So what do we have in QPinchGesture?
The commit in Qt's 4.7 branch is this one:
Download the latest release here: www.qt.io/download.
Qt 6.10 is now available, with new features and improvements for application developers and device creators.
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Dec 3, 2025
Improper Validation of Specified Quantity in Input vulnerability in Text..
Oct 3, 2025
Two vulnerabilities in Qt SVG module have been discovered. Uncontrolled..
Sep 26, 2025
Have you heard about Jenny? No, I do not mean, the girl next door, nor the..