Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.12
- import QtQuick.Window 2.12
- Rectangle {
- width: 100
- height: 100
- color: "black"
- MouseArea {
- id: ma
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: Qt.CrossCursor
- onClicked: {
- dot.x = mouseX;
- dot.y = mouseY;
- }
- }
- Rectangle {
- color: "blue"
- width: 1
- height: 1
- x: ma.mouseX
- y: ma.mouseY
- }
- Rectangle {
- id: dot
- color: "red"
- width: 1
- height: 1
- x: -1
- y: -1
- Rectangle {
- width: 20
- height: 1
- x: -10
- z: -1
- }
- Rectangle {
- width: 1
- height: 20
- y: -10
- z: -1
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement