aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick3dphysics/cannon/Crosshair.qml
blob: 98f426cab20e41d96b270ea5074afeb48cd8950c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick3D
import QtQuick3D.Physics
import QtQuick3D.Helpers
import QtQuick.Controls
import QtQuick.Layouts

Item {
    id: crossHair
    width: 31
    height: width
    readonly property real halfSize: width * 0.5 - 0.5
    Rectangle {
        width: crossHair.halfSize
        height: 1
        anchors.left: parent.left
        anchors.verticalCenter: parent.verticalCenter
        color: "black"
    }
    Rectangle {
        width: crossHair.halfSize
        height: 1
        anchors.right: parent.right
        anchors.verticalCenter: parent.verticalCenter
        color: "black"
    }
    Rectangle {
        width: 1
        height: crossHair.halfSize
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.top: parent.top
        color: "black"
    }
    Rectangle {
        width: 1
        height: crossHair.halfSize
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.bottom: parent.bottom
        color: "black"
    }
}