Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is PyGTK or PyQT preferred for making GTK-native Python apps? [closed]

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.

like image 779
Mike Crittenden Avatar asked Nov 22 '09 15:11

Mike Crittenden


4 Answers

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.

like image 110
Rob Avatar answered Nov 19 '22 11:11

Rob


  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.
like image 27
ceth Avatar answered Nov 19 '22 10:11

ceth


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...

like image 42
user129975 Avatar answered Nov 19 '22 11:11

user129975


In my opinion use PYQT as its definately superior for a few reasons. There is no worries with pixmaps ever, there is only one library coded in the same style and conventions. In pygtk you need to learn up to 4 libraries coded in a different style. You have to learn GLIB constants at least if not GLIB variable names as well even though they are a complete 1 to 1 swap with the stdlib C type itself, but why use standard types everyone else uses when as the master of your toolkit you can use pretty useless special purpose types which then can be forced onto everyone else. Gnome developers need a serious wake up.

Go with PYQT its sane easy to use and wont make you constantly look up documentation to find out why you cant use standard code.

like image 1
Verne Avatar answered Nov 19 '22 11:11

Verne