views:

696

answers:

3

I'm a web developer looking to get my feet wet with coding up a little desktop app for Ubuntu in Python. I've scoured the web looking for the pros and cons of PyGTK vs. PyQT and can't really find any good comparisons.

What do you guys think? Do they both produce native-looking widgets on a GNOME system? Is one easier to use than the other? Any opinions would be nice.

Sorry for the subjective question.

+3  A: 
  1. PyGTK application will look more native on a Gnome system. PyQt application will look more native on a KDE system.
  2. As I found PyGTK have better documentation then PyQt.
  3. It will take the same time to write a program on PyQt and PyGTK.
demas
No preference for the actual code/syntax of one over the other?
Mike Crittenden
In both cases it will by python code and python syntax. :)
demas
+4  A: 

I've written reasonably large apps in both PyGTK and PyQt. On balance, my personal opinion is that PyQt is superior, but not by so much that it's worth worrying about. If you're only worried about supporting Ubuntu, then use PyGTK; it'll give a better look and feel. If you think you may want to port this app to other platforms, then use PyQt; PyQt is far and away the superior crossplatform solution.

A: 

In my experience, having made both PyGTK and PyQT apps, there is little difference on the underlying programming side of things. PyQT seems more consistent across different flavors of Linux, where GTK is constantly changing and breaking on older distributions.

PyQT has QTCreator, which is a great GUI designer. PyGTK has Glade3, which is getting better, but not as good. Until recently Glade was a bad joke. If you need to draw GUIs in an editor, PyQT is probably the better choice. Otherwise, I'd go with PyGTK for coding because the online PyGTK documentation is excellent.

One bizarre thing I've found is PyQT has poor support for dynamic menu item callbacks. Maybe I just didnt use it right, but PyGTK is a bit more flexible in comparison.

It's a tough choice, really. But if you design your application right, the interface should be irrelevant; you could design your app with multiple interfaces...