Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Create a multitouch application
Forum Updated to NodeBB v4.3 + New Features

Create a multitouch application

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 846 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Claudia
    wrote on last edited by
    #1

    I'm trying to write a multitouch desktop application. I have a QML based application and now I try to drag more than one QML element at the same time. I tried to use MultiPointTouchArea, but this doesen't work. So I got 2 elements. For example 2 pictures, which should be draggable by two different persons at the same time ...
    If I define a rectangle containing the MultiPointTouchArea and I link one touchPoint with each picture, the first touch event moves the first picture and the second touch event moves the second picture.

    Like in this example code:

    @Rectangle {
    width: 400; height: 400
    MultiPointTouchArea {
    anchors.fill: parent
    touchPoints: [
    TouchPoint { id: point1 },
    TouchPoint { id: point2 }
    ]
    }

        Rectangle {
            width: 30; height: 30
            color: "green"
            x: point1.x
            y: point1.y
        }
    
        Rectangle {
            width: 30; height: 30
            color: "yellow"
            x: point2.x
            y: point2.y
        }
    }@
    

    This is not, what I'm looking for. I want them to move, if they are touched and dragged, both at the same time, without disturbing each other and without a order of touch events.

    Is this possible in qml? Or do I have to code a C++ function?

    I hope you understand my problem.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SL1978
      wrote on last edited by
      #2

      I m facing the same issue, i can not make two zoom event at the same time by using MultiPointTouchArea , if anyone can share some sample code for two hand/two person multitouch control in qml it will be much appreciated.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved