aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/doc/snippets/qtquickcontrols-custom-palette-buttons.qml
blob: 3b72207d872e1d5681e32a1be61cf2bc9f2d4a7e (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) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

//![entire]
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

ApplicationWindow {
    visible: true

    //![palette]
    palette {
        buttonText: "red"
        button: "khaki"

        disabled {
            buttonText: "lavender"
            button: "coral"
        }
    }
    //![palette]

    ColumnLayout {
        id: layout
        anchors.fill: parent
        anchors.margins: 3
        Button {
            text: qsTr("Disabled button")
            enabled: false
        }

        Button {
            text: qsTr("Enabled button")
        }

        TextField {
            Layout.fillWidth: true
            placeholderText: "type something here"
        }
    }
}
//![entire]