zoukankan      html  css  js  c++  java
  • paip.python ide eric55.3.7 安装以及建立项目使用 最佳实践

    paip.python ide eric5-5.3.7 安装以及建立项目使用 最佳实践


    作者Attilax ,  EMAIL:1466519819@qq.com 
    来源:attilax的专栏
    地址:http://blog.csdn.net/attilax


    先要安装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 interface files ...


    Compiling source files ...


    Installing eric5 ...


    Installation complete.


    Press enter to continue...


    //建立项目
    toolbar>>>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脚步测试,看到效果,如图:




    参考
    python+PyQT+Eric安装配置 - Python开发技术文章_教程 - 红黑联盟.htm
  • 相关阅读:
    Win7安装netbeans 找不到JDK
    MyEclipse10 中设置Jquery提醒,亲测可用
    Property 'submit' of object #<HTMLFormElement> is not a function
    JSP Unable to compile class for JSP
    JSP session过期时间(小记)
    JSP乱码(小记)
    JS 正则表达式基础
    CSS 盒子模型
    Cmder--window开发者神器!!
    encodeURI和encodeURIComponent两者的区别
  • 原文地址:https://www.cnblogs.com/attilax/p/15199467.html
Copyright © 2011-2022 走看看