先要安装D:\Python334eric\Python.exe D:\eric5-5.3.7\install.py
在运行 D:\Python334eric\Python.exe D:\eric5-5.3.7\eric\eric5.pyw
//////现象
D:\Python334eric\Python.exe D:\eric5-5.3.7\eric\eric5.pyw
File "D:\eric5-5.3.7\eric\Utilities\__init__.py", line 56, in <module>
from eric5config import getConfig
ImportError: No module named 'eric5config'
原因
可能是没安装.直接运行
解决:
D:\Python334eric\Python.exe D:\eric5-5.3.7\install.py
D:\Python334eric\Python.exe D:\eric5-5.3.7\install.py
Checking dependencies
Python Version: 3.3.2
Found PyQt4
Found QtHelp
Found QScintilla2
Found QtGui
Found QtNetwork
Found QtSql
Found QtSvg
Found QtWebKit
Qt Version: 4.8.5
PyQt Version: 4.10.3
QScintilla Version: 2.7.2
All dependencies ok.
Cleaning up old installation ...
Creating configuration file ...
Compiling user inte易做图ce files ...
Compiling source files ...
Installing eric5 ...
Installation complete.
Press enter to continue...
//////////建立项目
易做图>>>project >>new
//////////建立窗体
4、2、在Demo项目中添加Forms,用PyQT4设计
单击软件界面左面的Projcet-Viewer中的第二个选项卡Forms在下面空白区域中,右键鼠标->New form... 弹出对话框中选择Dialog,然后OK-给ui文件起个名字(Login.ui),保存后,会自弹出QT4设计窗口
///////////编译ui文件到py文件
选择中Login.ui文件右键点击“compile form”,就会在Project-Viewer--->Sources生成一个UI_Login.py的脚步文件,如图:
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(300, 200)
self.centralWidget = QtGui.QWidget(MainWindow)
self.centralWidget.setObjectName(_fromUtf8("centralWidget"))
self.pushButton = QtGui.QPushButton(self.centralWidget)
self.pushButton.setGeometry(QtCore.QRect(40, 60, 75, 23))
self.pushButton.setObjectName(_fromUtf8("pushButton"))
MainWindow.setCentralWidget(self.centralWidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
self.pushButton.setText(_translate("MainWindow", "PushButton", None))
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
MainWindow = QtGui.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())
/////////// 运行
提示输入python.exe路径: D:\Python334eric\Python.exe
F2运行ui_Login.py脚步测试,看到效果,