Python + QT developed by ECLIPSE

Source: Internet
Author: User

Qt has a good idea, the least code, and the largest function. It is easy to use. For python, the word "awesome" is used ". Therefore, the interface can be developed in scripting language, which is indeed very efficient. It feels cooler than the interface for advanced languages, though not necessarily so dazzling? Microsoft's WPF is also very good, but it is too large. Not cross-platform.

 

So use python to write QT.

 

Languages and libraries: qt4.7, python3.2, and pyqt4

Integrated Development Environment: Eclipse + pydev + Vim

Development Tool: QT-Elipse-integration/qdesigner + pyuic

Code and Project Management: googlecode + Hg

 

Interface Compilation:

You can use pyuic to compile a py file on the UI prepared by designer.

For convenience, I added a Python script external tool in Eclipse:

Import sys, OS <br/> If Len (SYS. argv) <= 1: <br/> Print ("no input. UI file found! ") <Br/> sys. exit () <br/> uifile = sys. argv [1] <br/> OUTFILE = uifile. replace (". "," _ ") + ". PY "<br/> using STR =" D:/python32/python.exe D:/python32/lib/Site-packages/pyqt4/UIC/pyuic. PY "<br/> OS. system (using STR + uifile + "-o" + OUTFILE) <br/> 

It is to pass a parameter to pyuic to compile the desired py file and add it to eclipse's external tools for ease of use. Run the command in cmd every time.

 

In addition, there is a problem with pydev. It does not recognize the things in my pyqt4 namespace. An error is always reported. Although it does not affect execution, it looks uncomfortable.

 

Solution:

On the Code Analysis page of pydev in eclipse perferences:

Change the undefined variable from Import action on the undefined page to ignore it ..

 

Finally, several links are attached for backup:

1. QT eclipse integration: http://qt.nokia.com/developer/eclipse-integration/

2. pydev: http://pydev.org/nightly/

3. Eclipse Hg: http://www.vectrace.com/eclipse-update/

4. viplugin: http://www.viplugin.com/

 

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.