Merge pull request #4 from status-im/splitview

basic, resizable splitview
This commit is contained in:
Iuri Matias 2020-05-07 13:55:25 -04:00 committed by GitHub
commit 3a69578845
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 !== ""
}
}
} }
} }
} }
} }