aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2017-07-18 16:05:59 +0200
committerMitch Curtis <mitch.curtis@qt.io>2017-07-19 10:39:52 +0000
commit10fb81121502693bad3171ba6d7b3cbbad58858f (patch)
tree56de8e07b3fb57da4ae32b868e7cdee5f1c19b6a /tests
parent867979435caf7a9fc5813537abee54e94bd616d9 (diff)
testbench: add dialog, flat buttons, make toolbar scalable
Change-Id: If29604b8131ded53bd947097b00e5fab4d41dd2e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/testbench/testbench.qml73
1 files changed, 62 insertions, 11 deletions
diff --git a/tests/manual/testbench/testbench.qml b/tests/manual/testbench/testbench.qml
index c596ceca..4ec9b1ea 100644
--- a/tests/manual/testbench/testbench.qml
+++ b/tests/manual/testbench/testbench.qml
@@ -101,6 +101,7 @@ ApplicationWindow {
ToolTip.text: text
ToolTip.delay: 1000
ToolTip.visible: hovered
+ Layout.fillWidth: true
}
ToolButton {
text: "Pressed"
@@ -109,6 +110,7 @@ ApplicationWindow {
ToolTip.text: text
ToolTip.delay: 1000
ToolTip.visible: hovered
+ Layout.fillWidth: true
}
ToolButton {
text: "Checked"
@@ -118,6 +120,7 @@ ApplicationWindow {
ToolTip.text: text
ToolTip.delay: 1000
ToolTip.visible: hovered
+ Layout.fillWidth: true
}
ToolButton {
text: "Highlighted"
@@ -126,19 +129,12 @@ ApplicationWindow {
ToolTip.text: text
ToolTip.delay: 1000
ToolTip.visible: hovered
+ Layout.fillWidth: true
}
ToolButton {
text: "Disabled"
enabled: false
- }
-
- ToolSeparator {}
-
- ToolButton {
- text: "1"
- }
- ToolButton {
- text: "2"
+ Layout.fillWidth: true
}
ToolSeparator {}
@@ -147,11 +143,12 @@ ApplicationWindow {
id: menuButton
text: "Menu"
hoverEnabled: true
+ checked: menu.visible
+ checkable: true
ToolTip.text: text
ToolTip.delay: 1000
ToolTip.visible: hovered
- checked: menu.visible
- checkable: true
+ Layout.fillWidth: true
Menu {
id: menu
@@ -190,6 +187,30 @@ ApplicationWindow {
}
}
}
+
+ ToolButton {
+ id: dialogButton
+ text: "Dialog"
+ hoverEnabled: true
+ onClicked: dialog.open()
+ ToolTip.text: text
+ ToolTip.delay: 1000
+ ToolTip.visible: hovered
+ Layout.fillWidth: true
+
+ Dialog {
+ id: dialog
+ x: (window.width - width) / 2
+ y: (window.height - height) / 2
+ standardButtons: Dialog.Ok | Dialog.Cancel
+ parent: window.contentItem
+
+ Label {
+ text: "Lorem ipsum dolor sit amet, \nconsectetuer adipiscing elit, \n"
+ + "sed diam nonummy nibh euismod tincidunt ut \nlaoreet dolore magna aliquam erat volutpat."
+ }
+ }
+ }
}
Item {
@@ -342,6 +363,36 @@ ApplicationWindow {
RowLayout {
spacing: window.controlSpacing
+ Button {
+ text: "Flat"
+ flat: true
+ }
+ Button {
+ text: "Flat+PR"
+ down: true
+ flat: true
+ }
+ Button {
+ text: "Flat+CH"
+ checked: true
+ flat: true
+ }
+ Button {
+ text: "Flat+CH+PR"
+ checked: true
+ down: true
+ flat: true
+ }
+ Button {
+ text: "Flat+DIS"
+ enabled: false
+ flat: true
+ }
+ }
+
+ RowLayout {
+ spacing: window.controlSpacing
+
DelayButton {
text: "DelayButton"
}