aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/snippets/qml/qml-documents/qmldocuments.qml
blob: b71ff6cad8b8171601e8daf1b41f48c1f7dc8cfc (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
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

//! [document]
import QtQuick

Rectangle {
    property alias text: textItem.text

    width: 100; height: 30
    border.width: 1
    radius: 5
    antialiasing: true

    gradient: Gradient {
        GradientStop { position: 0.0; color: "darkGray" }
        GradientStop { position: 0.5; color: "black" }
        GradientStop { position: 1.0; color: "darkGray" }
    }

    Text {
        id: textItem
        anchors.centerIn: parent
        font.pointSize: 20
        color: "white"
    }

}
//! [document]