GUI:-please answer want to learn GUI programming in python , how should i proceed.

Michael Torrie torriem at gmail.com
Sat Dec 14 15:10:24 EST 2013


On 12/14/2013 10:42 AM, rurpy at yahoo.com wrote:
> The other big, widely-used GUI toolkit is PyQt.  It runs on 
> both Python2 and Python3.  There is another version of it
> called PySide which is API compatible with PyQt but has 
> different licensing terms.  PyQt comes with a very good 
> drag-and-drop form designer.

Just to be clear, PyQt does not provide the drag and drop form designer.
That comes from QtDesigner or QtCreator, which is part of Qt itself and
you can use it to design GUIs for use in any language that Qt has
bindings for, not just Python.  PyQt probably does come with a code
generator to convert the xml GUI definitions into Python, but these days
such use is discouraged in favor of using Qt itself to load the XML file
at runtime and build the objects on the fly for you.  It's way more
flexible and there's no code generation needed.  (Apple has done this
for years with Cocoa with their nib files in the bundle.)

> I have played a little with both wxPython an PyQt and found 
> learning to use them from the web difficult because of their 
> size and complexity.  But both of them have pretty good books 
> about them available:

Yes there are concepts you'll have to wrap your brain around such as how
to do proper widget layout.  Things aren't placed in a fixed way
usually.  They are allowed to grow and shrink with the window size.  And
you will have to grasp how events work.

Of all the APIs I've used, I think GTK in Python is the cleanest (PyGTK
or PyObject).  But if I was targeting Windows or Mac I'd stick with
PySides/PyQt.




More information about the Python-list mailing list