12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import QtQuick 2.4
- import QtQuick.Controls 2.3
- import QtQuick.Layouts 1.3
- Popup {
- id: popup
- height: 200
- dim: true
- clip: false
- width: 400
- modal: true
- focus: true
- closePolicy: Popup.NoAutoClose
- ColumnLayout {
- anchors.fill: parent
- Text {
- Layout.alignment: Qt.AlignCenter
- id: popupText
- color: "#ffffff"
- text: qsTr("Enter the IP to connect:")
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: 20
- }
- TextField {
- Layout.alignment: Qt.AlignCenter
- id: popupIpInput
- text: qsTr("")
- placeholderText: "Enter IP"
- horizontalAlignment: Text.AlignHCenter
- }
- Text {
- id: popupStatusText
- color: "#df3f3f"
- text: qsTr("")
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- Layout.alignment: Qt.AlignCenter
- font.pixelSize: 20
- }
- Button {
- Layout.alignment: Qt.AlignCenter
- id: popupConnectButton
- text: qsTr("Connect")
- enabled: popupIpInput.acceptableInput
- font.pointSize: 16
- // @disable-check M223
- onClicked: {
- // @disable-check M222
- _qmlHandler.onEnterIp(popupIpInput.text)
- // @disable-check M222
- popup.close()
- }
- }
- }
- }
|