https://www.codenong.com/cs106161699/
sudo apt-get install python3-pyqt5
sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools
安装
sudo apt-get install qtcreator
保存界面文件
转化成py可用的文件
python -m PyQt5.uic.pyuic ./qtui1.ui -o ./UI_1test.py
调用
import sys from PyQt5.QtWidgets import QApplication, QWidget,QMainWindow from PyQt5.QtGui import QIcon import pyqtgraph as pg import numpy as np #导入类 from UI_1test import * #一个是这个类本身的,一个是这个类继承 class Example(QMainWindow,Ui_MainWindow): def __init__(self): #QMainWindow.__init__(self) #Ui_MainWindow.__init__(self) super(Example, self).__init__() self.setupUi(self) if __name__ == '__main__': app = QApplication(sys.argv) ui=Example() ui.show() sys.exit(app.exec_())
后期如果用 图开发
pip install pyqtgraph