-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.qml
53 lines (49 loc) · 1.2 KB
/
Main.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import QtQuick
import QtQuick.Controls
Window {
id: root
width: 640
height: 480
visible: true
title: qsTr("VPN test")
Connections {
target: appEngine
function onConnectionStatusChanged(statusMsg) {
statusText.placeholderText = statusMsg
if (appEngine.isEnabled()) {
connectButton.text = "Disconnect"
enterIP.clear()
enterIP.readOnly = true
}
else {
connectButton.text = "Connect"
enterIP.readOnly = false
}
}
}
Column {
id: column
width: 125
height: 75
anchors.centerIn: parent
TextField {
id: enterIP
placeholderText: "Enter IP address:"
}
Row {
Button {
id: connectButton
text: "Connect"
onClicked: {
appEngine.handleServerConnection(enterIP.text)
}
}
TextArea {
id: statusText
placeholderText: "Disabled"
readOnly: true
width: 240
}
}
}
}