Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

One Card! - Multiplayer Card Game

 import QtQuick 2.0

 // recognizes swipes and switches between scenes
 MouseArea {
   property int startX
   property int startY

   // direction signals
   signal swipeRight
   signal swipeLeft

   onPressed: {
     startX = mouse.x
     startY = mouse.y
   }

   onReleased: {
     var deltax = mouse.x - startX
     var deltay = mouse.y - startY

     if (Math.abs(deltax) > 50 || Math.abs(deltay) > 50) {
       if (deltax > 30 && Math.abs(deltay) < 30) {
         // swipe left
         swipeLeft();
       } else if (deltax < -30 && Math.abs(deltay) < 30) {
         // swipe right
         swipeRight();
       }
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded