import QtQuick 2.0

//Effect 2 :
//Item
Rectangle {

    width: 100
    height: 62

    Rectangle {
        id: box
        width: 50
        height: 50
        color: "#277ee0"
    }

    MouseArea {
        id: dragArea
        property bool beDrag: false;

        anchors.fill: parent
        hoverEnabled: true

        onPressed: {
            beDrag = true;
        }
        onReleased: {
            beDrag = false;
        }
        onPositionChanged: {
            if (beDrag)
            {
                box.x = mouseX;
                box.y = mouseY;
            }
        }
    }
}
