Python gui编程pyQt5安装步骤
===============================
-m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py
import sys
import untitled
from PyQt5.QtWidgets import QApplication, QMainWindow
if __name__ == '__main__':
app = QApplication(sys.argv)
MainWindow = QMainWindow()
ui = untitled.Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())
==============================
pip install PyQt5 |
Pip3 install PyQt5 |
https://riverbankcomputing.com/software/pyqt/download5 |
下载地址
http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.4.1/PyQt5-5.4.1-gpl-Py3.4-Qt5.4.1-x64.exe/download |
如果 pyQt
C:\Program Files\Python36\Lib\site-packages\PyQt5
没有此目录 就继续 执行 最前面的命令
import sys
import untitled
from PyQt5.QtWidgets import QApplication, QMainWindow
if __name__ == '__main__':
app = QApplication(sys.argv)
MainWindow = QMainWindow()
ui = untitled.Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())