Hello, everyone. Today’s topic is Qt and GTK: Application Appearance and GUI Toolkits.
Many people start using Linux and gradually become more comfortable with it, but still encounter things that seem familiar without being fully understood. Have you ever felt that way? I’d like to write a few beginner-friendly columns from time to time, and hopefully help answer some of the simple questions that newcomers often have.
In this article, I’d like to talk a little about GUI toolkits such as GTK and Qt.
Why Do KDE and GNOME Use Different Applications?
When researching Linux, BSD, or other free operating systems, you’ve probably come across phrases like “a GTK application” or “a Qt-based application.”
For beginners, it can be confusing that applications with similar functionality often have different names depending on whether you’re using the KDE or GNOME desktop environment. For example, when viewing PDF files, KDE typically provides Okular, while GNOME often includes Evince.
The reason for this difference is that KDE and GNOME are built on different GUI toolkits. KDE uses Qt, while GNOME uses GTK.
I’ll explain GUI toolkits in more detail shortly, but broadly speaking, they are one of the factors that determine how an application looks and feels. To maintain a consistent user experience, KDE tends to favor applications developed with Qt, while GNOME tends to favor applications developed with GTK.
What Is a GUI Toolkit?
A GUI toolkit is, as the name suggests, a collection of components used to build a GUI (Graphical User Interface). It is sometimes also called a widget toolkit.
When developing an application, programmers can use a GUI toolkit to create windows, buttons, menus, and other interface elements without having to implement those components from scratch.
In other words, the GUI toolkit is responsible for much of an application’s appearance. As a result, applications built with different GUI toolkits often have distinct visual styles and user experiences.
GTK and Qt
There are many GUI toolkits available, but most Linux desktop applications are built using either GTK or Qt.
Other examples include Java-based toolkits such as JavaFX and Swing, as well as wxWidgets, which can be used from programming languages such as Python. The widget toolkit article on Wikipedia lists many more examples.
GTK was originally developed as the GIMP Toolkit for the image editor GIMP. Over time, it evolved into a cross-platform GUI toolkit that is now used by a wide variety of applications.
GTK itself is written in C, but bindings are available for many programming languages, allowing developers to use GTK from languages other than C. Because it is maintained by the GNOME Foundation, GTK has a particularly close relationship with the GNOME desktop environment.
Qt, on the other hand, is a cross-platform application framework. While it is often used as a GUI toolkit, it also provides functionality for developing server software and console applications.
The name is commonly pronounced “cute.” Thanks to its polished look and feel and the availability of both commercial and open-source licensing options, Qt is widely used in commercial software as well.
Qt is primarily developed in C++, but developers can use language bindings and APIs maintained by the community to work with Qt from many other programming languages.
Different GUI Toolkits Can Result in Very Different Appearances
At this point, you might wonder:
What happens if you install a GTK application in a KDE desktop environment?
The answer is simple: it will usually work perfectly fine.
However, its appearance—often referred to as its look and feel—may differ significantly from the rest of the KDE desktop. If no GTK theme is configured, the application may fall back to a generic default appearance that feels out of place alongside native KDE applications.
As a result, GTK applications can sometimes stand out visually in an otherwise Qt-based desktop environment.
Desktop Environments and Their GUI Toolkits
Let’s summarize the relationship between popular desktop environments and the GUI toolkits they use.
| Desktop Environment | GUI Toolkit |
|---|---|
| KDE | Qt |
| GNOME | GTK |
| Xfce | GTK |
| LXDE | GTK |
| LXQt | Qt |
| Budgie | GTK |
| MATE | GTK |
| Cinnamon | GTK |
Full-featured desktop environments such as KDE and GNOME provide far more than just the basic desktop. They also include a variety of companion applications and utilities.
As you might expect, these default applications are usually built using the same GUI toolkit as the desktop environment itself. This is why different desktop environments often ship with applications that perform similar tasks but have different names and appearances.
Understanding which GUI toolkit a desktop environment is based on can help you better understand the applications that come with it. It can also make it easier to choose software that matches the look and feel of your desktop when installing additional applications.
Final Thoughts
In this article, I’ve discussed GUI toolkits, a topic that anyone using Linux in a graphical environment encounters sooner or later.
I wrote this article as if I were explaining the concept to my younger self when I first started using Linux. Because of that, it may not be the most universally appealing topic, but I hope it helps beginners understand the desktop Linux ecosystem a little better.
If you have any requests or suggestions for future beginner-friendly topics, I’d be happy to hear them.
Note: This article reflects the state of the software ecosystem at the time it was written. Over time, some information may become outdated or no longer accurately reflect current projects and technologies.