aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/imageelements/ShadowRectangle.qml
blob: b81da838fe7a6289d08934daad7d89860d95d37d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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 }
}