Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.4.0, 5.4.1
-
None
-
Android, iOS, Linux
Description
Hi,
I want to report a bug with Flickable and PinchArea and would like seek for alternative solution. The problem can be demonstrated with following code:
import QtQuick 2.3 import QtQuick.Window 2.2 Window { id : window visible: true Flickable { id : flickable anchors.fill: parent interactive: true contentWidth: container.width contentHeight: container.height flickableDirection: Flickable.HorizontalAndVerticalFlick PinchArea { pinch.target : container pinch.maximumScale: 8 pinch.minimumScale: 0.5 anchors.fill: parent onPinchStarted: { console.log("pinch started"); flickable.interactive = false } onPinchFinished: { flickable.interactive = true; } } Item { id: container width: window.width height: window.height Rectangle { anchors.centerIn: parent width: window.width * 0.5 height: window.height * 0.5 color : "red" } } } }
It shows a red rectangle in the center of screen. You may drag it by single finger and pinch it by two fingers to resize. It is working well with Qt 5.3.2 on Android 4 and iOS 8 .
However, if it is compiled with Qt 5.4.0 / 5.4.1 , it will be very difficult to get the pinching works. Your fingers must be touch on the screen at the SAME time. Otherwise, the pinch started signal will not be triggered.
The example project has been attached.
Thanks.
p.s Will it have alternative solution in using Flickable + PinchArea?