[Qt-interest] Best way to make a GUI for a set of python scripts

Andreas Pakulat apaku at gmx.de
Sat Jan 23 08:43:48 CET 2010


On 23.01.10 10:02:21, Rohan Prabhu wrote:
> Hey all,
> There are a set of python scripts that perform a certain functionality,
> which as such are console based. I want to make a GUI for the python
> scripts. All the scripts can be executed and the whole functionality can be
> achieved purely with the console command line. In that case, how do I
> implement a GUI for the python scripts? Currently, I am faced with two
> options (or three?):
> 
> 1. Using QProcess to run the python interpretor and getting the output and
> making it work.

This is the C++ solution.

> 2. Using QtPython to run the scripts internally, although I believe it is
> kind of an overkill.
> 3. Using PyQt to design the GUI, but then Python is something I dont have
> much of a comfort level with and experience.

I'm not sure what you refer to with "QtPython", trying to find that on
the net suggests that people are simply confused and actually do mean
PyQt with that. At least I couldn't find any traces of a second Qt
wrapper for Python thats ready for production use. (Nokia's LGPL version
is called PySide).

> I would most probably prefer a complete C++/Qt solution, but I need a
> consult on as to what the most elegant solution would be.

Then you'll have to run the scripts with QProcess. Unless you're
interested in learning Python I suggest to stick to the language you're
most comfortable with.

Andreas

-- 
Is this really happening?



More information about the Qt-interest-old mailing list