-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverint.py
52 lines (41 loc) · 1.76 KB
/
serverint.py
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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'server.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from Server import Server
from PyQt5 import QtCore, QtGui, QtWidgets
import os, subprocess
class Ui_SerInt(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(206, 130)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.conn = QtWidgets.QPushButton(self.centralwidget)
self.conn.setGeometry(QtCore.QRect(60, 50, 75, 23))
self.conn.setObjectName("conn")
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
self.conn.clicked.connect(self.connserv)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.conn.setText(_translate("MainWindow", "connexion"))
def connserv(self):
#Server("localhost",5555)
subprocess.Popen(args='python Server.py')
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Ui_SerInt()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())