Hi Günther,
Thank you for the information. The reason why I am interested in this feature it is because in case of having an item that can be moved and zoomed at the same time, something that it is common when working with pictures.
This can be currently done with a Flickable + PinchArea. However, this does not work well with the latest Qt version. This is really an issue in Qt/QML than a Felgo issue. Let’s take this example, that I copied from http://www.qtcentre.org/threads/66562-Flickable-and-PinchArea-interoperability.
In this post, it is mentioned that the example works fine if the target is inside the pinch area, but I checked that with the latest Qt version, it does not work well in any kind of combination. The reason is that when you hit the item with one finger the Flickable captures the event for dragging. If you want to zoom in or out you have to hit the item with two fingers at the same time, which is quite difficult and presents a bad fluid UI experience.
import Felgo 3.0
import VPlay 1.0
import QtQuick 2.0
import QtGraphicalEffects 1.0
App {
Rectangle
{
width: 400; height: 400
Flickable {
id: f1
anchors { fill: parent; margins: 2 }
contentWidth: 700
contentHeight: 700
clip: true
boundsBehavior: Flickable.StopAtBounds
PinchArea {
width: Math.max(f1.contentWidth, f1.width)
height: Math.max(f1.contentHeight, f1.height)
property real initialWidth
property real initialHeight
onPinchStarted: {
initialWidth = f1.contentWidth
initialHeight = f1.contentHeight
}
onPinchUpdated: {
f1.resizeContent(initialWidth * pinch.scale, initialHeight * pinch.scale, pinch.center)
}
Rectangle {
width: f1.contentWidth
height: f1.contentHeight
color: "white"
RadialGradient
{
anchors.fill: parent
gradient: Gradient{
GradientStop { position: 0.0; color: "blue" }
GradientStop { position: 0.25; color: "cyan" }
GradientStop { position: 0.5; color: "green" }
GradientStop { position: 0.75; color: "red" }
GradientStop { position: 1; color: "orange" }
}
}
}
}
}
}
}
The good news is that this issue is solved with Qt Quick pointer handlers, a component called FakeFlickable + PinchHandler are used in this example, http://code.qt.io/cgit/qt/qtdeclarative.git/tree/tests/manual/pointer/photosurface.qml. It works as expected we can drag with one finger and when another finger hits the item it can be zoom in or out fluently.
This is already working in Felgo and great if it will be also supported in the Felgo live client and web editor in the future.