aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/doc/snippets/qtquickcontrols-custom-palette-buttons.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/doc/snippets/qtquickcontrols-custom-palette-buttons.qml')
-rw-r--r--src/quickcontrols/doc/snippets/qtquickcontrols-custom-palette-buttons.qml43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-custom-palette-buttons.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-custom-palette-buttons.qml
new file mode 100644
index 0000000000..3b72207d87
--- /dev/null
+++ b/src/quickcontrols/doc/snippets/qtquickcontrols-custom-palette-buttons.qml
@@ -0,0 +1,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]