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

Forums

OverviewFelgo 2 Support (Qt 5) › Strange Windows Phone MouseArea behaviour

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #9329

    Jan

    I investigated some strange behavior on Windows Phone, that does not persist on Android and iOS. Have a look at the code below.

    Steps to reproduce:

    1.: press and move the gameItem

    2.: accidentally leave the physical screen

    3.: reenter physical screen

    Expected result: Touch action keeps moving the gameItem (as Android and iOS do)

    Actual result: pause function gets triggered

    Found on a Microsoft Lumia 535, if that helps

    Thanks,

    Schiff

     

    Here is the code:

    import QtQuick 2.4
    import Felgo 3.0
    
    Scene {
    	id: gameScene;
    	MouseArea {
    		anchors.fill: parent;
    		onClicked: {
    			pause();
    		}
    	}
    	MultiResolutionImage {
    		id: gameItem
    		source: "xyz.png";
    		anchors.bottom: parent.bottom;
    		x: parent.width/2 - gameItem.width/2;
    		MouseArea {
    			anchors.fill: parent
    			drag.target: gameItem
    			drag.axis: Drag.XAxis
    			drag.minimumX: 0
    			drag.maximumX: gameScene.width - gameItem.width
    		}
    	}
    	function pause() {
    	}
    }

     

Viewing 1 post (of 1 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded