GTK+ or Qt?

Sunday, 2 July 2006, michuk

GTK+ and Qt are widget libraries for Linux and other operating systems (including MS Windows). Most of the Linux GUI applications use one of them. They differ in looks (i.e. different open-file dialogues, overall app interface) and functionality (Qt is regarded as a wide-featured).

If you’ve chosen Gnome (or XFCE) as your desktop environment, it’s better to use more GTK+ apps since they itegrate with Gnome better and work faster in this environment (all the libraries are preloaded on Gnome startup). Similarily, KDE users should prefer Qt-based apps for the same reasons.

Most of the Qt apps’ names start with capital “K”. Some examples are KWrite, KLines, KOffice or KWifiManager. There are exceptions though, i.e. Psi, Gwenview or amaroK which are also Qt apps but their authors decided not to follow the masses :)

Of course, both GTK+ and Qt are Linux apps and you can use them under any DE or WM. It may be however that if they use a “foreign” library, the program may start slower, look a bit different than other apps and not be as integrated as the native ones.

Subscribe to RSS feed for this article! | Trackback URI

2 Comments

fold this thread hicelik  Wednesday, 21 February 2007 o godz. 1:38 pm #  Add karma Subtract karma  +0

What about fox toolkit?

(Comments wont nest below this level)
 
fold this thread madman  Wednesday, 11 March 2009 o godz. 8:57 am #  Add karma Subtract karma  +1

Nowadays, there is heavy integration between the different libraries – especially QT & GTK+. For example, If I drag a folder from Nautilus file manager (Gnome/GTK+) to K3b cd/dvd burning program (KDE/Qt), it works!

As for the “K”, it is usually used in KDE programs. Qt just happens to be the development library used. You can actually use Qt to write programs that do not even use any KDE specific libraries. And GTK+ doesn’t require GNOME.

I think the real issue is “which would a particular developer want to use?”. GTK+ is (or was) a lighter weight toolkit, and is written C. Qt is written C++. So depending on which language you are using, you may prefer one over the other.

Loading a program that uses a non-native library (like a KDE app in GNOME) does require the additional library(s) to load, but by today’s standards, it isn’t that big of a deal. Only the first load will take an extra few seconds, then the library(s) will be in cache/memory for others to share. Personally, I’d like to see the prefixes done away with for most program names – it’s kind of annoying.

(Comments wont nest below this level)
 
Name (required)
E-mail (required - never shown publicly)
URI

Adjust field size: shrink | enlarge)


You can use simple HTML in your comments. Some examples are as follows:
  • A hyperlink: <a href="polishlinux.org">GNU/Linux for everyone!</a>,
  • Strong text: <strong>Strong text</strong>,
  • Italic text: <em>italic text</em>,
  • Strike: <strike>strike</strike>,
  • Code: <code>printf("hello world");</code>,
  • Block quote: <blockquote>Block quote</blockquote>

Warning: include(0php’): failed to open stream: No such file or directory in /sites/polishlinux.org/wp-content/themes/jakilinuxorg/page.php on line 70

Warning: include(): Failed opening '0php’' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /sites/polishlinux.org/wp-content/themes/jakilinuxorg/page.php on line 70