aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/dialogs/ColorDialogs.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/dialogs/ColorDialogs.qml')
-rw-r--r--examples/quick/dialogs/ColorDialogs.qml38
1 files changed, 36 insertions, 2 deletions
diff --git a/examples/quick/dialogs/ColorDialogs.qml b/examples/quick/dialogs/ColorDialogs.qml
index 7817c8edf8..f3d253aa8c 100644
--- a/examples/quick/dialogs/ColorDialogs.qml
+++ b/examples/quick/dialogs/ColorDialogs.qml
@@ -46,8 +46,8 @@ Rectangle {
width: 320
height: 200
color: palette.window
-
SystemPalette { id: palette }
+ clip: true
ColorDialog {
id: colorDialog
@@ -62,7 +62,7 @@ Rectangle {
Column {
anchors.fill: parent
- anchors.margins: 8
+ anchors.margins: 12
spacing: 8
Text {
font.bold: true
@@ -106,4 +106,38 @@ Rectangle {
}
}
}
+
+ Rectangle {
+ anchors {
+ left: parent.left
+ right: parent.right
+ bottom: parent.bottom
+ }
+ height: 50
+ color: Qt.darker(palette.window, 1.1)
+ border.color: Qt.darker(palette.window, 1.3)
+ Row {
+ spacing: 6
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: 12
+ height: parent.height - 6
+ width: parent.width
+ Button {
+ text: "Open"
+ anchors.verticalCenter: parent.verticalCenter
+ onClicked: colorDialog.open()
+ }
+ Button {
+ text: "Close"
+ anchors.verticalCenter: parent.verticalCenter
+ onClicked: colorDialog.close()
+ }
+ Button {
+ text: "set to green"
+ anchors.verticalCenter: parent.verticalCenter
+ onClicked: colorDialog.color = "green"
+ }
+ }
+ }
}