QtQuick Examples - MouseArea
This is an example of the MouseArea element in QML

This example shows you how to respond to clicks and drags with a MouseArea.
When you click inside the red square, the Text element will list several properties of that click which are available to QML.
Signals are emitted by the MouseArea when clicks or other discrete operations occur within it
The MouseArea can also be used to drag elements around. By setting the parameters of the drag property, the target item will be dragged around if the user starts to drag within the MouseArea.
Files: