diff options
Diffstat (limited to 'examples/quick/dialogs/systemdialogs/CustomDialogs.qml')
| -rw-r--r-- | examples/quick/dialogs/systemdialogs/CustomDialogs.qml | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/examples/quick/dialogs/systemdialogs/CustomDialogs.qml b/examples/quick/dialogs/systemdialogs/CustomDialogs.qml index 43515536d..90d012e1e 100644 --- a/examples/quick/dialogs/systemdialogs/CustomDialogs.qml +++ b/examples/quick/dialogs/systemdialogs/CustomDialogs.qml @@ -67,7 +67,7 @@ Item { onApply: lastChosen.text = "Apply" onReset: lastChosen.text = "Reset" - Text { + Label { text: "Hello world!" } } @@ -91,9 +91,8 @@ Item { ColumnLayout { id: column width: parent ? parent.width : 100 - Text { + Label { text: "<b>What</b> is the average airspeed velocity of an unladen European swallow?" - textFormat: Text.StyledText Layout.columnSpan: 2 Layout.fillWidth: true wrapMode: Text.WordWrap @@ -104,7 +103,7 @@ Item { id: answer onEditingFinished: spinboxDialog.click(StandardButton.Ok) } - Text { + Label { text: "m/s" Layout.alignment: Qt.AlignBaseline | Qt.AlignLeft } @@ -144,7 +143,7 @@ Item { color: "lightskyblue" implicitWidth: 400 implicitHeight: 100 - Text { + Label { text: "Hello blue sky!" color: "navy" anchors.centerIn: parent @@ -156,12 +155,11 @@ Item { } } - Column { + ColumnLayout { anchors.fill: parent anchors.margins: 12 spacing: 8 - Text { - color: palette.windowText + Label { font.bold: true text: "Message dialog properties:" } @@ -170,22 +168,26 @@ Item { text: "Modal" Binding on checked { value: helloDialog.modality != Qt.NonModal } } - CheckBox { - id: customizeTitle - text: "Window Title" - checked: true - width: parent.width + RowLayout { + CheckBox { + id: customizeTitle + text: "Window Title" + Layout.alignment: Qt.AlignBaseline + checked: true + } TextField { id: windowTitleField - anchors.right: parent.right + Layout.alignment: Qt.AlignBaseline + Layout.fillWidth: true text: "Custom Dialog" - width: root.width - customizeTitle.implicitWidth - 30 } } - + Label { + text: "Buttons:" + } Flow { spacing: 8 - width: parent.width + Layout.fillWidth: true property bool updating: false function updateButtons(button, checked) { if (updating) return @@ -289,12 +291,14 @@ Item { Component.onCompleted: updateButtons() } - Text { + Label { id: lastChosen } + Item { Layout.fillHeight: true } } Rectangle { + id: bottomBar anchors { left: parent.left right: parent.right @@ -311,22 +315,22 @@ Item { anchors.leftMargin: 12 width: parent.width Button { - text: "Hello World dialog" + text: "Hello World" anchors.verticalCenter: parent.verticalCenter onClicked: helloDialog.open() } Button { - text: "Input dialog" + text: "Input" anchors.verticalCenter: parent.verticalCenter onClicked: spinboxDialog.open() } Button { - text: "Date picker" + text: "Date" anchors.verticalCenter: parent.verticalCenter onClicked: dateDialog.open() } Button { - text: "Buttonless marginless dialog" + text: "No buttons or margins" anchors.verticalCenter: parent.verticalCenter onClicked: filledDialog.open() } |
