写这个博客也是捣实了几天才弄好,总结几点:
1.pyqt5.10.0 的安装可自己下载安装文件。
2.配置外部工具时
program:/home/zhangq/Qt5.10.0/5.10.0/gcc_64/bin/designer
working directory: project path.with ui files.
another
program:/usr/local/python3/bin/python3.6
arguements:-m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py
working directory: project path.with ui files.
3.generate from ui to py files,and then add codeing:
if __name__=="__main__": app = QtWidgets.QApplication(sys.argv) widget = QtWidgets.QMainWindow() ui = Ui_MainWindow() ui.setupUi(widget) widget.show(); sys.exit(app.exec())
attention: 3th line, qmainwindow is ui 's project. 与建立ui时的选择的工程类型有关系。