How to integrate PyQt designer into Eclipse?

I am trying to integrate pydev, pyqt, python and eclipse. Now the code can run without errors. And I know to make a graphical interface in Qt Designer. and then changed it in Eclipse.

Now I want to integrate Qt Designer from PyQt into Eclipse. Like Qt Eclipse integration for C ++. Use PyQt Designer in Eclipse. Can someone teach me how to do this? Many thanks!

By the way, I'm trying to set a preference for a qt project in Eclipse.

But when I add a new qt version. I did not know how to borrow the path to bin. Since there is no bin path in PyQt, nor was there qmake, uic, rcc, etc. The version name I typed is PyQt-Py2.7-x64-gpl-4.8.5-1.exe. I borrow an include path, for example C: \ python27 \ Lib \ site-packages \ PyQt4 \ Sib \ PyQt4.

my OS is win7. Thank you for your responses! God bless you!

+8
eclipse qt pyqt qt-designer integrate
source share
2 answers

The only way to install Qt is Eclipse Integration , so you can open ui files directly in eclipse.

But this does not work very well with plugins and custom widgets, since it requires the exact version of Qt to integrate Eclipse and PyQt (the same compiler flags ..), and this may not be the case.

Of course, you could build Qt Eclipse Integration yourself if it works with the version of Qt that you use with PyQt. (It is pre-built for 4.6.1, so it may or may not work with later versions of Qt.)

What we did was tell Eclipse to open .ui files in Qt Designer outside of Eclipse. Not so nice, but it works with custom widget plugins, so there’s a definite win for us.

+3
source share

An easy way to open .ui files created by the constructor is to convert them to python code using the "pyuic4" that comes with pyqt. On Windows and Linux (I have not tested them on a Mac), open a shell and go to the directory containing your .ui file, then run the command / flag / args ... See the example below:

pyuic4 -o newOutputFile.py theOriginalPyQtFile.ui

In the example, my input file is called "theOriginalPyQtFile.ui", and the output file to be generated is called "newOutputFile.py" and is stored in the same directory as "theOriginalPyQtFile.ui".

After that, just open "newOutputFile.py" in Eclipse or any IDE.

+1
source share

All Articles