make tabs work

This commit is contained in:
Iuri Matias 2020-05-07 15:46:10 -04:00
parent d313b81ebc
commit 0fad06136e
1 changed files with 54 additions and 39 deletions

View File

@ -15,7 +15,7 @@ ApplicationWindow {
width: parent.width width: parent.width
height: parent.height height: parent.height
anchors.fill: parent anchors.fill: parent
// spacing: 50 // spacing: 50
TabBar { TabBar {
id: tabBar id: tabBar
@ -84,55 +84,70 @@ ApplicationWindow {
} }
} }
SplitView { StackLayout {
Layout.fillHeight: true width: parent.width
// anchors.fill: parent currentIndex: tabBar.currentIndex
// width: parent.width
Layout.leftMargin: 0
Layout.fillWidth: true
Layout.minimumWidth: 100
Layout.preferredWidth: 200
// Layout.preferredHeight: 100
Item { SplitView {
width: 300 x: 9
height: parent.height y: 0
Layout.minimumWidth: 200 Layout.fillHeight: true
// anchors.fill: parent
// width: parent.width
Layout.leftMargin: 0
Layout.fillWidth: true
Layout.minimumWidth: 100
Layout.preferredWidth: 200
// Layout.preferredHeight: 100
Button { Item {
id: button width: 300
text: qsTr("TEST BUTTON") height: parent.height
} Layout.minimumWidth: 200
}
Item { Button {
width: parent.width/2 id: button
height: parent.height text: qsTr("TEST BUTTON")
ColumnLayout {
anchors.fill: parent
RowLayout {
Layout.fillHeight: true
TextArea { id: callResult; Layout.fillWidth: true; text: logic.callResult; readOnly: true }
} }
}
RowLayout { Item {
Layout.bottomMargin: 20 width: parent.width/2
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom height: parent.height
transformOrigin: Item.Bottom
Label { text: "data2" } ColumnLayout {
TextField { id: txtData; Layout.fillWidth: true; text: "" } anchors.fill: parent
Button {
text: "Send" RowLayout {
onClicked: logic.onSend(txtData.text) Layout.fillHeight: true
enabled: txtData.text !== "" TextArea { id: callResult; Layout.fillWidth: true; text: logic.callResult; readOnly: true }
}
RowLayout {
Layout.bottomMargin: 20
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
transformOrigin: Item.Bottom
Label { text: "data2" }
TextField { id: txtData; Layout.fillWidth: true; text: "" }
Button {
text: "Send"
onClicked: logic.onSend(txtData.text)
enabled: txtData.text !== ""
}
} }
} }
} }
} }
Item {
}
Item {
}
} }
} }