Constructing Python+pyqt+eric platform for graphical development __python

Source: Internet
Author: User
Tags i18n qt designer
Prepare to install the program: 2, 1, download Python3.2

Official website: http://www.python.org/

Download Address: Http://www.python.org/ftp/python/3.2.2/python-3.2.2.msi 2, 2, download PyQt4

Official website: http://www.riverbankcomputing.co.uk

Download address: Download Windows bit installer

Www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-Py3.2-x86-gpl-4.8.5-1.exe 2, 3, download Eric5

Official website: http://eric-ide.python-projects.org/

Download Address: Http://nchc.dl.sourceforge.net/project/eric-ide/eric5/stable/5.1.5/eric5-5.1.5.zip

Chinese bag: Http://nchc.dl.sourceforge.net/project/eric-ide/eric5/stable/5.1.5/eric5-i18n-zh_CN. Gb2312-5.1.5.zip 3, installation configuration steps: 3, 1, installation Pyhon3.2

First install Python3.2, the default installation to the C:\python32 directory, after the installation is successful, will appear in the Start menu.


When the Pyhon is installed, remember to configure the environment variable and add C:\Python32 to the path, as shown in figure:

3, 2, installation PyQt4

Then install PYQT4, corresponding to the PyQT4 version of python3.2 pyqt-py3.2, click the installer: Pyqt-py3.2-x86-gpl-4.8.5-1.exe, install to the default directory can be installed in the Start menu can see the PyQT4 GUI designer as shown:

3, 3, installation Eric5

A, unzip the download package Eric5-5.1.5.zip and ERIC5-I18N-ZH_CN. Gb2312-5.1.5.zip, put

Eric5-i18n-zh_cn. The files in the gb2312-5.1.5 folder are copied to the eric5-5.1.5 folder.

B, copy the eric5-5.1.5 to the C:\ directory, click the install.py file in eric5-5.1.5 to install. As shown in figure:

S

C, PYTHONW configuration: You can configure by clicking on the installation directory Eric5.bat (first time) or Eric5-configure.bat
Click on the Editor->autocompation-> check box. Qscintilla-> hook up about two choices

box, and then in the source below, select from Document and API files. As shown in figure:

Click on the editor->apis-> hook on Complie APIs autocompation, and then in language, select

Python. Click the Add from Installed APIs button below to select the desired. API file. Last Click

Compile APIs. As shown in figure:

4. Make a demo 4, 1, with Eric to create a demo project

Projcet name (project name): Demo
Projcet type (project type): QT4 GUI
Projcet directory (Project Save directory): Select the project file directory you plan to store.
Click OK, the Version Selection dialog box appears, and none is selected. 4, 2, in the Demo project to add forms, with PyQT4 design

Click the Second tab in the Projcet-viewer on the left side of the software interface forms in the blank area below, right mouse->new form ... Pop-up dialog box to select Dialog, and then ok-to the UI file name (Login.ui), after saving, will be ejected from the QT4 design window


Go to the QT Designer Forms design tool, where you can visually design your login form. This tool is very simple, Chinese operating interface, a look will be.

4, 3, back to the Eric Interface, design program.

Back to Eric IDE in Project-viewer---->forms as shown:

Select the Login.ui file right click on "Compile form", will be in the project-viewer--->sources generate a ui_login.py footsteps file, as shown:

Then you can press F2 run ui_login.py footstep test, see the effect, as shown:


"Install" first make sure that the Python2.6 version is already installed, and then install PYQT. Then install ERIC4, first decompression to any place, the Chinese package plug-in also compressed, the directory i18n inside the two files eric4_zh_cn. GB2312.QM and ERIC4_ZH_CN. Gb2312.ts copy to a directory i18n in the Eric4 that you just unzipped, and then double-click install.py in the Eric4 home directory. ERIC4 will automatically copy the files to your Python directory, in C:\Python26\Lib\site-packages\eric4\.

Once installed, you can double-click the eric4.py or Eric4.pyw below Eric4 to start Eric4. The difference between these two files is that the former will open a CMD window, the latter not.

When you first open Eric4, a configuration window appears first and can be simply configured (or later configured in settings–preferences):

Under Eidtor, click on the APIs, tick "Compile APIs automatically", select language as "Python", click Add from Installed APIs, Choose Eric4.api or other APIs you need. Then click on the "Compile APIs" below and it will take some time. After the end point apply.

Then click on the Autocompletion, the inside of the three are checked. Then click Qscintilla, select from Document and API files, Apply and OK.

Once configured, you can use ERIC4.

[Note 1.] Website request installs Python,qt,pyqt,qscintilla, of course python is necessary, in addition I found that as long as the installation of PyQt on the line, Qt and Qscintilla is not necessary, Pyqt-py2.6-gpl-4.8.1-1.exe already contains Qscintilla and QT libraries (Figure yno.20101209).

[Note 2.] Eric's working directory name cannot be in Chinese.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.