MultipointTouchArea inside target
-
Hi everyone,
can i use MultipointtouchArea inside a target like a PinchArea ? When i used the code below on a touch screen on win8 there is no problem. But on linux board with TUIO interface like QTuio i have some troubles.
I use a delta because the target "rect" and "rect2" move so the toucharea moves too.
Is the design good or not ? Why this code works on windows and not under linux ?
Thanks all to give me some answers.
My code :
@Rectangle {
id: rect
width: 30; height: 30
color: "yellow"MultiPointTouchArea { anchors.fill: rect onTouchUpdated: { var pt = touchPoints[0]; if (pt === undefined){ return } var delta = Qt.vector2d(pt.x - pt.previousX, pt.y - pt.previousY); rect.x += delta.x rect.y += delta.y } } } Rectangle { id: rect2 width: 30; height: 30 color: "green" x: 300 MultiPointTouchArea { anchors.fill: rect2 onTouchUpdated: { var pt = touchPoints[0]; if (pt === undefined){ return } var delta = Qt.vector2d(pt.x - pt.previousX, pt.y - pt.previousY); rect2.x += delta.x rect2.y += delta.y } } }@
-
If the goal is to make rect1 and rect2 draggable following a single touch point, MouseArea's drag.target property facilitates that without the javascript handler.
Maybe someone can help with the Linux issues if you describe what is happening.
-
The goal is a multi-user application, the MouseArea is not designed for two simultaneous touch.
Is the MultiPointTouchArea can be used as this or not ? Because this method move the area and the rect at the same time. ( and should move all touchpoints but it not works )
Before post bug reports for linux i have to be sure of my problem is not a design problem.
tks jeremy