aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/imageelements/ShadowRectangle.qml
blob: 2be2fb81f27961dc7aa7c0d2212cff8f54c47250 (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
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick

Item {
    property alias color : rectangle.color

//! [shadow]
    BorderImage {
        anchors.fill: rectangle
        anchors {
            leftMargin: -6
            topMargin: -6
            rightMargin: -8
            bottomMargin: -8
        }
        border {
            left: 10
            top: 10
            right: 10
            bottom: 10
        }
        source: "pics/shadow.png"
    }
//! [shadow]

    Rectangle {
        id: rectangle

        anchors.fill: parent
    }
}