119 lines
2.7 KiB
QML
119 lines
2.7 KiB
QML
import QtQuick 2.0
|
|
import QtQuick.Controls 2.14
|
|
import QtQuick.Layouts 1.0
|
|
|
|
|
|
Item {
|
|
id: element
|
|
width: parent.width - 80
|
|
height: parent.height
|
|
// width: 800
|
|
// height: 600
|
|
property alias textEditFontfamily: textEdit.font.family
|
|
visible: true
|
|
|
|
ColorAnimation {
|
|
from: "white"
|
|
to: "black"
|
|
duration: 200
|
|
}
|
|
Rectangle{
|
|
|
|
width: parent.width
|
|
height: parent.height
|
|
color: "#aeaeae"
|
|
scale: 1
|
|
transformOrigin: Item.Center
|
|
|
|
Button {
|
|
id: button
|
|
x: 162
|
|
y: 262
|
|
width: 128
|
|
height: 52
|
|
text: qsTr("打开网口")
|
|
}
|
|
|
|
Label {
|
|
id: label6
|
|
x: 60
|
|
y: 84
|
|
text: qsTr("打开端口: ")
|
|
verticalAlignment: Text.AlignVCenter
|
|
Layout.preferredHeight: 40
|
|
renderType: Text.QtRendering
|
|
Layout.preferredWidth: 125
|
|
horizontalAlignment: Text.AlignHCenter
|
|
wrapMode: Text.NoWrap
|
|
font.pointSize: 20
|
|
}
|
|
|
|
TextEdit {
|
|
id: textEdit
|
|
x: 248
|
|
y: 81
|
|
width: 233
|
|
height: 40
|
|
text: qsTr("9001")
|
|
font.italic: false
|
|
font.bold: true
|
|
verticalAlignment: Text.AlignVCenter
|
|
Layout.columnSpan: 2
|
|
Layout.preferredHeight: 33
|
|
Layout.preferredWidth: 233
|
|
selectionColor: "#f0f0f1"
|
|
cursorVisible: true
|
|
horizontalAlignment: Text.AlignHCenter
|
|
font.pixelSize: 20
|
|
}
|
|
|
|
Label {
|
|
id: label7
|
|
x: 60
|
|
y: 137
|
|
text: qsTr("协议选择: ")
|
|
verticalAlignment: Text.AlignVCenter
|
|
Layout.preferredHeight: 40
|
|
renderType: Text.QtRendering
|
|
Layout.preferredWidth: 125
|
|
horizontalAlignment: Text.AlignHCenter
|
|
wrapMode: Text.NoWrap
|
|
font.pointSize: 20
|
|
}
|
|
|
|
ComboBox {
|
|
id: comboBox1
|
|
x: 248
|
|
y: 137
|
|
width: 143
|
|
height: 40
|
|
}
|
|
|
|
RadioButton {
|
|
id: radioButton
|
|
x: 70
|
|
y: 188
|
|
width: 138
|
|
height: 41
|
|
text: qsTr("websocket")
|
|
checkable: true
|
|
checked: true
|
|
onCheckableChanged: {
|
|
console.log(radioButton.checkable)
|
|
}
|
|
|
|
onClicked:{
|
|
if(radioButton.checked == true){
|
|
radioButton.checked = false
|
|
}else{
|
|
radioButton.checked = true
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|