JavascriptItem { width: 360 height: 360 Rectangle { id: cropFrame width: parent.width/2 height: parent.height/2 color: "#00000000" radius: 2 border.color: "#3654b5" } MouseArea { anchors.fill: parent onPressed: { cropFrame.border.width: 4 } onReleased: { cropFrame {border.width: 2} } }}
import QtQuick 1.0Item { width: 360 height: 360 Rectangle { id: cropFrame width: parent.width/2 height: parent.height/2 color: "#00000000" radius: 2 border.color: "#3654b5" } MouseArea { anchors.fill: parent onPressed: { cropFrame.border.width = 4 } onReleased: { cropFrame.border.width = 2 } }}
var xpos = mouseX;
Javascriptimport QtQuick 1.0 Item { width: 360 height: 360 Rectangle { id: cropFrame width: parent.width/2 height: parent.height/2 color: "#00000000" radius: 2 border.color: "#3654b5" border.width: mouseArea.pressed ? 4 : 2 } MouseArea { id: mouseArea anchors.fill: parent }}