1.安装
pip3 install pyqt5 pip3 install pyqt5-tools
2.PyQt5的 *.ui 转为python代码
pyuic5 -o test.py test.ui
3.程序和界面分离,主程序调用界面代码
import sys from PyQt5.QtWidgets import QMainWindow from test5 import Ui_MainWindow # 在此导入自定义界面类 if __name__ == "__main__": app = QApplication(sys.argv) win = SocketServer() win.show() sys.exit(app.exec_())
标签:__,界面,记录,win,PyQt5,sys,使用,import From: https://www.cnblogs.com/jkme/p/17119430.html