What Is Difference Between GTK And QT Applications?
-
- Home
- Questions
- Tags
- Users
- Jobs
- Companies
- Unanswered
- Teams
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Try Teams for free Explore Teams - Teams
-
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams What is difference between GTK and QT applications? Ask Question Asked 10 years, 7 months ago Modified 4 years, 8 months ago Viewed 136k times 104Many packages are available in both GTK and QT versions.
- What's the difference between them?
- Is there any difference in performance or working method?
4 Answers
Sorted by: Reset to default Highest score (default) Date modified (newest first) Date created (oldest first) 69In general, the difference from a user perspective should be purely cosmetic. Qt and GTK set themes independently (via, e.g., qtconfig or gtk-chtheme) but this is harmonized by some desktop environments.
GNU/Linux tends to be more GTK oriented than Qt in the sense that the former is more commonly used, so you may want to prefer it when given the choice; an exception would be under KDE, which uses Qt for its own applications -- although none of these factors is very important.
A more significant issue would be in contexts with very limited RAM (as in, < 1/4 GB); in this case you would probably want the system to use exclusively GTK or Qt, but not both. On most modern desktops with gigabytes of memory, however, this is not a concern -- using both extensively might cost you an extra (wild guess) 50-100 MB.
Note that there are also different versions of both GTK (2 and 3) and Qt (3 and 4) still widely used but not backward compatible (so a Qt 3 application cannot use Qt 4 libraries). However, both versions may exist on a system at the same time and the most serious consequence of this would be the potential for confusion and a bit more memory bloat.
Share Improve this answer Follow edited May 14, 2014 at 13:49 answered May 14, 2014 at 13:09 goldilocksgoldilocks 88.9k32 gold badges210 silver badges268 bronze badges 7- 15 I would be extremely interested to know how you come to the conclusuion that Linux is more GTK oriented? Linux, typically implies only the Linux kernel which in general has no bias towards either of the toolkits, since it is an OS kernel, not a GUI userspace program. If you meant to imply GNU/Linux as an operating system, I'd still dispute your claim. To say that GNU/Linux is more GTK oriented because Ubuntu is the most popular distro is like saying Christiano Ronaldo is the best sportsman because football is the most played game in the world. (I'd dispute that too) – darnir Commented May 14, 2014 at 13:14
- 20 @darnir I'll put the "GNU" qualifier in since I did mean the operating system in a colloquial sense. I'll defend my thesis that it is more GTK than Qt oriented: GTK (which originally stood for the "GIMP Tool Kit", and GIMP = the GNU Image Manipulation Program), GIMP, and GNOME are all GNU projects and a core part of their (userland) vision for an operating system, which paired with the kernel is what "linux" historically is. So GTK was developed primarily for linux, it is also native C (vs. Qt's C++), whereas Qt is more of a genuinely cross-platform entity. – goldilocks Commented May 14, 2014 at 13:23
- 3 While I will agree with you about the history and etymology of GTK, this does not implicitly imply that GNU/Linux is GTK oriented. In fact the opposite is true and is confirmed by your statements. GTK was designed for linux, not the other way around. I'd defend my thesis stating that Linux as a kernel and GNU/Linux as an operating system are agnostic towards any GUI Toolkit. GTK is often seen in the wild more than Qt because of Ubuntu's heavy dependence on it. Also the fact that it is lighter on system resources helps. – darnir Commented May 14, 2014 at 13:30
- 6 @darnir Yes, the OS is essentially agnostic WRT the GUI toolkit -- I would not claim GTK is "the native" toolkit, etc. But you're wrong about why it "is often seen in the wild more" -- GTK was the most widely used toolkit on the platform before Ubuntu even existed because of the aforementioned relationship with other fundamental parts used extensively by all distros. This is why most linux GUI apps are GTK apps already, and why, without more context to go on, it makes sense to tell a new user "You might as well pick that one", all else being equal. But it does not really matter. – goldilocks Commented May 14, 2014 at 13:42
- Utilizing multiple different toolkits would also require much more storage; I don't think this would impact performace, though, just the space for other things. – ananaso Commented May 14, 2014 at 14:06
No, there is no difference in the internal structure of such programs. GTK and Qt are user interface toolkits and frameworks. They are libraries that the developers use to design graphical interfaces.
When a graphical (GUI) program is written, first its core internals are developed. This is what makes the program run. You never see the core, they simply execute in the background. On top of this core, a User Interface (UI) is designed.
Now, the developers could design the complete interface from scratch, or re-use designs made by others. Re-using design has a major advantage. It allows all the programs in your computer to look similar. Hence, they use GUI toolkits. GTK and Qt are two extremely common GUI toolkits.
GTK is the standard toolkit for GNOME while Qt is used by KDE. From the user's point of view, it's just the looks that differ. The program remains the same at heart.
Share Improve this answer Follow edited May 14, 2014 at 15:58 nobody 1476 bronze badges answered May 14, 2014 at 13:08 darnirdarnir 4,5291 gold badge21 silver badges33 bronze badges Add a comment | 25Another important aspect to consider is the Qt licensing link to their license disclosure which is explicitly set to be freely available to most non-profit making projects, but a commercial relationship is possible and might have restrictions for that case. Whereas GTK, state explicitly that it can be used freely even in proprietary applications GTK statement:
Are there any licensing restrictions? GTK is free software and part of the GNU Project. However, the licensing terms for GTK, the GNU LGPL, allow it to be used by all developers, including those developing proprietary software, without any license fees or royalties.A key aspect of complex GUI development will rely upon GLADE as an designing kit and whether that suites your approach glade link. It aims to be cross platform, but may not be as extensively supported cross platform as Qt is.
Share Improve this answer Follow answered Jul 24, 2019 at 20:26 VassVass 5,4219 gold badges42 silver badges46 bronze badges Add a comment | 2How do they compare as far as their respective object models, and how closely do they follow the C++ standard -- in my limited experience, QT seemed to be a little hacky with it's code generators and reinventing the wheel with their own functionally equivalent classes for strings and classes. In short QT seemed to have more whistles and bells, which I'm sure many found useful, but it also seemed to have a heavy, proprietary feel to it. As I said, I had limited experience with it (and even less with Gtk). I'd like some opinions about how they compare today -- from a developer's perspective, who leans towards generic approaches to things that try to use C++ standards (like STL, C++ strings, threads etc)
Share Improve this answer Follow answered Apr 22, 2020 at 10:18 john soprychjohn soprych 311 bronze badge 1- This sounds very much like personal opinion, not a facts-based answer that's expected on most SE sites. Also note that things like QString were born out of necessity decades ago when there were no equivalent features in the STL. Now that modern C++ standards have picked up most of the features, many Qt classes are just thin wrappers around the native C++ solutions. – TooTea Commented Apr 22, 2020 at 14:38
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged
.- The Overflow Blog
- Why do developers love clean code but hate writing documentation?
- This developer tool is 40 years old: can it be improved?
- Featured on Meta
- The December 2024 Community Asks Sprint has been moved to March 2025 (and...
- Stack Overflow Jobs is expanding to more countries
Linked
49 Difference between Xorg and Gnome/KDE/Xfce 0 Why are Chrome/Brave Browser Bookmark folders grey in Linux distros? Instead of yellowRelated
17 How to make Compose work in GTK and Qt apps? 0 Is there an easy way to print the GTK and QT versions installed on a system? 2 GTK applications don't get the icon theme selected in KDE 3 How to fix broken GTK styles 10 How to tell what GTK and QT toolkits your applications are using 1 Does mixing up GTK and Qt applications slow down the machine? 6 How to get traditional scrollbars in GTK 2 and 3 apps in Debian 10? 0 liferea / webkit: GTK coilor theme ignored after minor version upgradeHot Network Questions
- How do I find the right size cap to close a water valve?
- Can I use copyleft-licensed library in MIT-licensed project?
- What are the legal consequences of publishing in massacre denial or hate speech according to paragraph 130 (5)?
- Why were my lead-acid batteries destroyed after operating them in parallel?
- Will a 10-speed Tiagra shifter work with 9-speed sora drivetrain
- Best Practices for Managing Open-Source Vulnerabilities in Enterprise Deployments
- problem with geometry package
- Is ‘drop by’ formal language?
- Is it possible to translate/rotate the camera in geometry nodes?
- Why does each page of Talmud end with the first word of the next page?
- How to simplify/refactor this code even more?
- Why is my LED burning out?
- Is it Appropriate to Request a Seminar Invitation from a University Department as a research Student?
- ping from script launched by cron
- I probably disallowed using the camera at some time in the past and now can't find a way to allow it again. How can I reenable it?
- Are special screws required inside an oven?
- No module named 'matplotlib.backends.registry'
- tar having much larger size than the containing files, can I make it smaller?
- Translation of "Nulla dies sine linea" into English within Context Given
- Can I omit 'мы' if the verb ends with '-ем'?
- How to add face/ fill edges to inner geometry in geometry nodes?
- Exploiting MSE for fast search
- Grounding isolated electrical circuit from a floating source (EV V2L)
- Bolt of rear derailleur rounded out and broke off - repair wire thread
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
Từ khóa » Gtk Vs Qt
-
I Love KDE,I Like QT, Why Is GTK The Preferred Toolkit On Linuxes ...
-
GTK Vs Qt? What Do You Prefer And Why? (2017 Edition) - Reddit
-
What Should I Choose: GTK+ Or Qt? [closed] - Stack Overflow
-
What's The Difference Between GTK+ And Qt? - MakeUseOf
-
Which Is Less System Intensive, Gtk+ Or Qt? - Quora
-
Difference Between GTK And QT
-
Which One Is Better: GTK+ Or QT? - Info4geek
-
GTK Or QT? - Lazarus Forum - Free Pascal
-
Gtk Or Qt Or Flutter For Developing Linux App - Value In Brief
-
GTK Or Qt? | Peter
-
Qt Vs GTK+ Vs WxWidgets - A Comparative Study - E-con Systems
-
GTK Vs QT · Issue #11 · Qalculate/qalculate-qt - GitHub
-
Uniform Look For Qt And GTK Applications - ArchWiki
-
The Growing Disconnect Between KDE And The Qt Company