Ubuntu – What’s the difference between GTK and QT

gtkguiprogrammingpythonqt

Please bear with me as I'm a newcomer to Linux.
I've been writing GUI programs in REALbasic on a Mac for several years. I'm trying to learn Python and I want to write GUI apps for Linux (primarily Ubuntu and Mint since they are the distros I have access to and they seem to be the most popular).
I basically have three questions:

  1. Are there any significant differences between GTK and QT
  2. I've toyed with quickly and Glade on Ubuntu but I understand that they are based on GTK 2 and this is now obsolete. Is that correct?
  3. Are there any all-in-one editors that let me design a GUI and then add Python code to it? (for instance, add a button to a window in the editor, double click the button and then add the Python code that is to execute when the button is pressed)

Sorry if these are really dumb questions but I want to start learning the 'right' tools from the start.

Best Answer

I'll try to answer your questions, without going in crazy directions.

  1. They are significantly different, even though they are both widget libs. Regular GTK+ is based on C, and QT on C++. Although bindings exist for almost every programming languages.

  2. You are fairly correct about GTK2, although there are so many GTK2 applications. I expect GTK2 to be in use for a while, just as GTK1 was. When push comes to shove, GTK2 is deprecated, and if you are starting fresh go GTK3.

  3. Remeber GTK, and QT, are just widget toolkits. For example... Gnome applications, use GTK and also the Gnome-Libs. If you want that, take a look at vala. It is considered simple, the vala compiles source-to-source directly to C, and has full bindings for many programming languages. You might also want to look at Anjuta, just make sure you have the new gtk3 versions. Apparently strait PyGTK only supports GTK2, current last I checked. If you are looking to avoid all Linux DE libs, I would suggest looking at QT. Plain QT is different from KDE applications, which include KDE libs. QT is considered very cross-platform, which is cool if you want to compile for non *nix. If you want to get started with QT + Python, look at PySide (LGPL) or PyQT (GPL). QT has some good GUI builders like qt creator, and qt-designer.