basic, resizable splitview

This commit is contained in:
Iuri Matias 2020-05-07 13:54:38 -04:00
parent 2e86a0c7c8
commit bc0c291580
1 changed files with 29 additions and 19 deletions

View File

@ -4,33 +4,43 @@ import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
ApplicationWindow { ApplicationWindow {
width: 800 width: 1024
height: 300 height: 768
title: "JSON RPC Caller" title: "JSON RPC Caller"
visible: true visible: true
menuBar: MenuBar { SplitView {
Menu {
title: "&File"
MenuItem { text: "&Exit"; onTriggered: logic.onExitTriggered() }
}
}
ColumnLayout {
anchors.fill: parent anchors.fill: parent
RowLayout { Item {
TextArea { id: callResult; Layout.fillWidth: true; text: logic.callResult; readOnly: true } width: 300
height: parent.height
} }
RowLayout { Item {
Label { text: "data" } width: parent.width/2
TextField { id: txtData; Layout.fillWidth: true; text: "" } height: parent.height
Button {
text: "Send" ColumnLayout {
onClicked: logic.onSend(txtData.text) anchors.fill: parent
enabled: txtData.text !== ""
RowLayout {
TextArea { id: callResult; Layout.fillWidth: true; text: logic.callResult; readOnly: true }
}
RowLayout {
Label { text: "data2" }
TextField { id: txtData; Layout.fillWidth: true; text: "" }
Button {
text: "Send"
onClicked: logic.onSend(txtData.text)
enabled: txtData.text !== ""
}
}
} }
} }
} }
} }