aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/testbench/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/testbench/main.qml')
-rw-r--r--tests/manual/testbench/main.qml775
1 files changed, 414 insertions, 361 deletions
diff --git a/tests/manual/testbench/main.qml b/tests/manual/testbench/main.qml
index b375a098..edf0aa49 100644
--- a/tests/manual/testbench/main.qml
+++ b/tests/manual/testbench/main.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
-import QtQuick 2.3
+import QtQuick 2.6
import QtQuick.Window 2.2
import QtQuick.Layouts 1.0
import Qt.labs.controls 1.0
@@ -56,19 +56,35 @@ ApplicationWindow {
property int controlSpacing: 10
+ Shortcut {
+ sequence: "Ctrl+Q"
+ onActivated: Qt.quit()
+ }
+
header: ToolBar {
+ Material.theme: Material.Dark
+
RowLayout {
anchors.fill: parent
ToolButton {
text: "Normal"
- onClicked: menu.visible ? menu.hide() : menu.show()
+ onClicked: menu.visible ? menu.close() : menu.open()
}
ToolButton {
text: "Pressed"
pressed: true
}
ToolButton {
+ text: "Checked"
+ checkable: true
+ checked: true
+ }
+ ToolButton {
+ text: "Highlighted"
+ highlighted: true
+ }
+ ToolButton {
text: "Disabled"
enabled: false
}
@@ -105,407 +121,460 @@ ApplicationWindow {
MenuItem {
text: "Option 1"
+ checkable: true
}
MenuItem {
text: "Option 2"
+ checkable: true
}
MenuItem {
text: "Option 3"
+ checkable: true
}
}
- Flickable {
+ Pane {
anchors.fill: parent
- topMargin: 30
- leftMargin: 30
- rightMargin: 30
- bottomMargin: 30
- contentHeight: flow.height
-
- Flow {
- id: flow
- width: parent.width
- spacing: 30
-
- RowLayout {
- spacing: window.controlSpacing
-
- Button {
- text: "Normal"
- }
- Button {
- text: "Pressed"
- pressed: true
- }
- Button {
- text: "Checked"
- checked: true
- }
- Button {
- text: "CH + PR"
- checked: true
- pressed: true
- }
- Button {
- text: "Disabled"
- enabled: false
- }
- Button {
- text: "CH + DIS"
- enabled: false
- checked: true
- }
- }
-
- RowLayout {
- spacing: window.controlSpacing
- Button {
- text: "HI"
- highlighted: true
- }
- Button {
- text: "HI + PR"
- highlighted: true
- pressed: true
- }
- Button {
- text: "HI + CH"
- highlighted: true
- checked: true
- }
- Button {
- text: "HI+CH+PR"
- highlighted: true
- pressed: true
- checked: true
- }
- Button {
- text: "HI + DIS"
- highlighted: true
- enabled: false
- }
- Button {
- text: "HI+CH+DIS"
- highlighted: true
- enabled: false
- checked: true
- }
- }
-
- RowLayout {
- CheckBox {
- text: "Normal"
- }
- CheckBox {
- text: "Pressed"
- pressed: true
- }
- CheckBox {
- text: "Checked"
- checked: true
- }
- CheckBox {
- text: "CH + PR"
- checked: true
- pressed: true
- }
- CheckBox {
- text: "Disabled"
- enabled: false
- }
- CheckBox {
- text: "CH + DIS"
- checked: true
- enabled: false
- }
- }
+ Flickable {
+ anchors.fill: parent
+ contentHeight: flow.height
- RowLayout {
- RadioButton {
- text: "Normal"
- }
- RadioButton {
- text: "Pressed"
- pressed: true
- }
- RadioButton {
- text: "Checked"
- checked: true
- }
- RadioButton {
- text: "CH + PR"
- checked: true
- pressed: true
- }
- RadioButton {
- text: "Disabled"
- enabled: false
- }
- RadioButton {
- text: "CH + DIS"
- checked: true
- enabled: false
- }
- }
+ Flow {
+ id: flow
+ width: parent.width
+ spacing: 30
- RowLayout {
- Switch {
- text: "Normal"
- }
- Switch {
- text: "Pressed"
- pressed: true
- }
- Switch {
- text: "Checked"
- checked: true
- }
- Switch {
- text: "CH + PR"
- checked: true
- pressed: true
- }
- Switch {
- text: "Disabled"
- enabled: false
- }
- }
+ RowLayout {
+ spacing: window.controlSpacing
- RowLayout {
- ProgressBar {
- value: 0.5
- }
- ProgressBar {
- value: 0.5
- indeterminate: true
- }
- ProgressBar {
- value: 0.5
- enabled: false
+ Button {
+ text: "Normal"
+ }
+ Button {
+ text: "Pressed"
+ pressed: true
+ }
+ Button {
+ text: "Checked"
+ checked: true
+ }
+ Button {
+ text: "CH + PR"
+ checked: true
+ pressed: true
+ }
+ Button {
+ text: "Disabled"
+ enabled: false
+ }
+ Button {
+ text: "CH + DIS"
+ enabled: false
+ checked: true
+ }
}
- }
- RowLayout {
- Slider {
- value: 0.5
- }
- Slider {
- value: 0.5
- pressed: true
- }
- Slider {
- value: 0.5
- enabled: false
- }
- }
+ RowLayout {
+ spacing: window.controlSpacing
- RowLayout {
- RangeSlider {
- first.value: 0.25
- second.value: 0.75
- }
- RangeSlider {
- first.value: 0.25
- first.pressed: true
- second.value: 0.75
- }
- RangeSlider {
- first.value: 0.25
- second.value: 0.75
- enabled: false
+ Button {
+ text: "HI"
+ highlighted: true
+ }
+ Button {
+ text: "HI + PR"
+ highlighted: true
+ pressed: true
+ }
+ Button {
+ text: "HI + CH"
+ highlighted: true
+ checked: true
+ }
+ Button {
+ text: "HI+CH+PR"
+ highlighted: true
+ pressed: true
+ checked: true
+ }
+ Button {
+ text: "HI + DIS"
+ highlighted: true
+ enabled: false
+ }
+ Button {
+ text: "HI+CH+DIS"
+ highlighted: true
+ enabled: false
+ checked: true
+ }
}
- }
-
- RowLayout {
- Item {
- implicitWidth: normalGroupBox.width
- implicitHeight: normalTextArea.implicitHeight
- TextArea {
- id: normalTextArea
+ RowLayout {
+ CheckBox {
text: "Normal"
}
- }
- Item {
- implicitWidth: normalGroupBox.width
- implicitHeight: normalTextArea.implicitHeight
-
- TextArea {
- text: "Placeholder"
+ CheckBox {
+ text: "Pressed"
+ pressed: true
}
- }
- Item {
- implicitWidth: normalGroupBox.width
- implicitHeight: normalTextArea.implicitHeight
-
- TextArea {
+ CheckBox {
+ text: "Checked"
+ checked: true
+ }
+ CheckBox {
+ text: "CH + PR"
+ checked: true
+ pressed: true
+ }
+ CheckBox {
text: "Disabled"
enabled: false
}
+ CheckBox {
+ text: "CH + DIS"
+ checked: true
+ enabled: false
+ }
}
- }
-
- RowLayout {
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalTextField.implicitHeight
- TextField {
- id: normalTextField
+ RowLayout {
+ RadioButton {
text: "Normal"
}
- }
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalTextField.implicitHeight
-
- TextField {
- placeholderText: "Placeholder"
+ RadioButton {
+ text: "Pressed"
+ pressed: true
+ }
+ RadioButton {
+ text: "Checked"
+ checked: true
+ }
+ RadioButton {
+ text: "CH + PR"
+ checked: true
+ pressed: true
+ }
+ RadioButton {
+ text: "Disabled"
+ enabled: false
+ }
+ RadioButton {
+ text: "CH + DIS"
+ checked: true
+ enabled: false
}
}
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalTextField.implicitHeight
- TextField {
+ RowLayout {
+ Switch {
+ text: "Normal"
+ }
+ Switch {
+ text: "Pressed"
+ pressed: true
+ }
+ Switch {
+ text: "Checked"
+ checked: true
+ }
+ Switch {
+ text: "CH + PR"
+ checked: true
+ pressed: true
+ }
+ Switch {
text: "Disabled"
enabled: false
}
}
- }
- RowLayout {
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalSpinBox.implicitHeight
-
- SpinBox {
- id: normalSpinBox
+ RowLayout {
+ ProgressBar {
+ value: 0.5
+ }
+ ProgressBar {
+ value: 0.5
+ indeterminate: true
+ }
+ ProgressBar {
+ value: 0.5
+ enabled: false
}
}
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalSpinBox.implicitHeight
- SpinBox {
- up.pressed: true
+ RowLayout {
+ Slider {
+ value: 0.5
+ }
+ Slider {
+ value: 0.5
+ pressed: true
+ }
+ Slider {
+ value: 0.5
+ enabled: false
}
}
- Item {
- implicitWidth: normalGroupBox.implicitWidth
- implicitHeight: normalSpinBox.implicitHeight
- SpinBox {
+ RowLayout {
+ RangeSlider {
+ first.value: 0.25
+ second.value: 0.75
+ }
+ RangeSlider {
+ first.value: 0.25
+ first.pressed: true
+ second.value: 0.75
+ }
+ RangeSlider {
+ first.value: 0.25
+ second.value: 0.75
enabled: false
}
}
- }
- RowLayout {
- GroupBox {
- id: normalGroupBox
- title: "Normal"
+ RowLayout {
+ Item {
+ implicitWidth: normalGroupBox.width
+ implicitHeight: normalTextArea.implicitHeight
+
+ TextArea {
+ id: normalTextArea
+ text: "Normal"
+ }
+ }
+ Item {
+ implicitWidth: normalGroupBox.width
+ implicitHeight: normalTextArea.implicitHeight
+ TextArea {
+ placeholderText: "Placeholder"
+ }
+ }
Item {
- implicitWidth: 200
- implicitHeight: 100
+ implicitWidth: normalGroupBox.width
+ implicitHeight: normalTextArea.implicitHeight
- BusyIndicator {
- anchors.centerIn: parent
+ TextArea {
+ text: "Disabled"
+ enabled: false
}
}
}
- GroupBox {
- enabled: false
- title: "Disabled"
+ RowLayout {
Item {
- implicitWidth: 200
- implicitHeight: 100
+ implicitWidth: normalGroupBox.implicitWidth
+ implicitHeight: normalTextField.implicitHeight
- BusyIndicator {
- anchors.centerIn: parent
+ TextField {
+ id: normalTextField
+ text: "Normal"
}
}
- }
- GroupBox {
- enabled: false
- title: "."
- label.visible: false
+ Item {
+ implicitWidth: normalGroupBox.implicitWidth
+ implicitHeight: normalTextField.implicitHeight
+ TextField {
+ placeholderText: "Placeholder"
+ }
+ }
Item {
- implicitWidth: 200
- implicitHeight: 100
+ implicitWidth: normalGroupBox.implicitWidth
+ implicitHeight: normalTextField.implicitHeight
- PageIndicator {
- count: 5
+ TextField {
+ text: "Disabled"
enabled: false
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
}
}
}
- }
- RowLayout {
- Frame {
- id: scrollBarFrame
+ RowLayout {
+ Item {
+ implicitWidth: normalGroupBox.implicitWidth
+ implicitHeight: normalSpinBox.implicitHeight
+ SpinBox {
+ id: normalSpinBox
+ }
+ }
Item {
- implicitWidth: 200
- implicitHeight: 100
+ implicitWidth: normalGroupBox.implicitWidth
+ implicitHeight: normalSpinBox.implicitHeight
- Label {
- text: "Normal"
- anchors.centerIn: parent
+ SpinBox {
+ up.pressed: true
}
+ }
+ Item {
+ implicitWidth: normalGroupBox.implicitWidth
+ implicitHeight: normalSpinBox.implicitHeight
- ScrollBar {
- size: 0.3
- position: 0.2
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
+ SpinBox {
+ enabled: false
}
}
}
- Frame {
+ RowLayout {
Item {
- implicitWidth: 200
- implicitHeight: 100
+ implicitWidth: normalGroupBox.implicitWidth
+ implicitHeight: normalComboBox.implicitHeight
- Label {
- text: "Pressed"
- anchors.centerIn: parent
+ ComboBox {
+ id: normalComboBox
+ model: 5
}
+ }
- ScrollBar {
- size: 0.3
- position: 0.2
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
+ Item {
+ implicitWidth: normalGroupBox.implicitWidth
+ implicitHeight: normalComboBox.implicitHeight
+
+ ComboBox {
pressed: true
+ model: ListModel {
+ ListElement { text: "Pressed" }
+ }
}
}
- }
- Frame {
Item {
- implicitWidth: 200
- implicitHeight: 100
+ implicitWidth: normalGroupBox.implicitWidth
+ implicitHeight: normalComboBox.implicitHeight
+
+ ComboBox {
+ enabled: false
+ model: ["Disabled"]
+ }
+ }
+ }
+
+ RowLayout {
+ GroupBox {
+ id: normalGroupBox
+ title: "Normal"
+
+ Item {
+ implicitWidth: 200
+ implicitHeight: 100
+
+ BusyIndicator {
+ anchors.centerIn: parent
+ }
+ }
+ }
+ GroupBox {
enabled: false
+ title: "Disabled"
- Label {
- text: "Disabled"
- anchors.centerIn: parent
+ Item {
+ implicitWidth: 200
+ implicitHeight: 100
+
+ BusyIndicator {
+ anchors.centerIn: parent
+ }
+ }
+ }
+ GroupBox {
+ enabled: false
+ title: "."
+ label.visible: false
+
+ Item {
+ implicitWidth: 200
+ implicitHeight: 100
+
+ PageIndicator {
+ count: 5
+ enabled: false
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ }
+ }
+ }
+
+ RowLayout {
+ Frame {
+ id: scrollBarFrame
+
+ Item {
+ implicitWidth: 200
+ implicitHeight: 100
+
+ Label {
+ text: "Normal"
+ anchors.centerIn: parent
+ }
+
+ ScrollBar {
+ size: 0.3
+ position: 0.2
+ active: true
+ orientation: Qt.Vertical
+ height: parent.height
+ anchors.right: parent.right
+ }
+ }
+ }
+
+ Frame {
+ Item {
+ implicitWidth: 200
+ implicitHeight: 100
+
+ Label {
+ text: "Pressed"
+ anchors.centerIn: parent
+ }
+
+ ScrollBar {
+ size: 0.3
+ position: 0.2
+ active: true
+ orientation: Qt.Vertical
+ height: parent.height
+ anchors.right: parent.right
+ pressed: true
+ }
+ }
+ }
+
+ Frame {
+ Item {
+ implicitWidth: 200
+ implicitHeight: 100
+ enabled: false
+
+ Label {
+ text: "Disabled"
+ anchors.centerIn: parent
+ }
+
+ ScrollBar {
+ size: 0.3
+ position: 0.2
+ active: true
+ orientation: Qt.Vertical
+ height: parent.height
+ anchors.right: parent.right
+ }
}
+ }
+ }
+
+ RowLayout {
+ Frame {
+ Layout.preferredWidth: 100
+ Layout.preferredHeight: 100
- ScrollBar {
+ ScrollIndicator {
size: 0.3
position: 0.2
active: true
@@ -514,65 +583,49 @@ ApplicationWindow {
anchors.right: parent.right
}
}
- }
- }
- RowLayout {
- Frame {
- Layout.preferredWidth: 100
- Layout.preferredHeight: 100
+ Frame {
+ Layout.preferredWidth: 100
+ Layout.preferredHeight: 100
- ScrollIndicator {
- size: 0.3
- position: 0.2
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
+ ScrollIndicator {
+ size: 0.3
+ position: 0.2
+ active: true
+ orientation: Qt.Vertical
+ height: parent.height
+ anchors.right: parent.right
+ enabled: false
+ }
}
}
- Frame {
- Layout.preferredWidth: 100
- Layout.preferredHeight: 100
-
- ScrollIndicator {
- size: 0.3
- position: 0.2
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- enabled: false
+ RowLayout {
+ Frame {
+ Tumbler {
+ model: 5
+ implicitWidth: 100
+ implicitHeight: 100
+ }
+ }
+ Frame {
+ Tumbler {
+ model: 5
+ implicitWidth: 100
+ implicitHeight: 100
+ enabled: false
+ }
}
}
- }
- RowLayout {
- Frame {
- Tumbler {
- model: 5
- implicitWidth: 100
- implicitHeight: 100
+ RowLayout {
+ Dial {
}
- }
- Frame {
- Tumbler {
- model: 5
- implicitWidth: 100
- implicitHeight: 100
+ Dial {
enabled: false
}
}
}
-
- RowLayout {
- Dial {
- }
- Dial {
- enabled: false
- }
- }
}
}
}