Slashdot Mirror


Intel Dev: GTK's Biggest Problem, and What Qt Does Better

Freshly Exhumed writes "Phoronix has an article about how Dirk Hohndel of Intel's Open-Source Technology Center has stirred the hornet's nest with a talk at Australia's Linux.Conf.Au (MP4 file) about what he views as the biggest problem with the GTK: he finds dealing with upstream GTK/GNOME developers to be tough, with frequent abuse and flame-wars, with accusations from the developers that "you're doing it wrong." Conversely, he found the Qt development community to be quite the opposite: willing to engage and help, with plenty of application developer documentation and fewer communication problems than with their GTK counterparts."

28 of 282 comments (clear)

  1. Woot! by Anonymous Coward · · Score: 5, Funny

    There hasn't been a good GTK / Qt flamewar around here for ages!

    Now that Qt is free, shouldn't we be migrating away from GTK?

  2. Re:GTK is trash by Anonymous Coward · · Score: 5, Funny

    pissing you off, mainly.

  3. Re:GTK is trash by Anonymous Coward · · Score: 4, Informative

    Many years ago it was the only FSF-approved cross platform toolkit, so it gained a fair amount of momentum because of that. Qt has since moved to a more favorable license but a lot of people have yet to migrate.

  4. GTK+ is a C library by i+ate+my+neighbour · · Score: 5, Informative

    The only reason to use it now is if for some reason you want to avoid C++ and develop in pure C.

    1. Re:GTK+ is a C library by Greyfox · · Score: 4, Informative
      I've found with C++11 and Boost that I prefer to develop in C++ than Java. Or pretty much anything else for that matter. Design your code reasonably well and it can be solid, and fast. I've left my applications running constantly for months on end and never seen a resource leak, and the compiled binaries are tiny. I just got done stamping the last of the ruby code out of the code base I have to maintain and my new code runs significantly faster, is so much more maintainable that the previous developers of the code really ought to be ashamed of themselves and takes under a minute to deploy. In about the time it takes gem to warm up, I've deployed my files, verified md5sums on 4 different systems and left to get a donut. Mmmm..... Donut.....

      I don't care for GTK or QT. I kind of wish the boost guys would write a widget toolkit so I don't have to do that myself, when I finally get to that item on my to-do list (It's sitting down around 4 or 5 on the list right now, so it'll be a while.)

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    2. Re:GTK+ is a C library by Brandybuck · · Score: 4, Insightful

      When it comes to the UI, objects are natural. Every C toolkit goes through hoops to provide you with objects of some kind. Motif, GTK, etc. So why not just use an object oriented language to begin with?

      You don't have to use the dark corners of the language. Qt sticks to just the Object Oriented parts of C++, with just a tiny bit of templates. Not a functor in sight (unless you wander toward the totally optional Qt::Concurrent framework). Internally it uses all of the language, but as an API it provides just the object oriented subset.

      --
      Don't blame me, I didn't vote for either of them!
  5. Re:GTK is trash by pe1rxq · · Score: 4, Insightful

    Unfortunatly it took them years to formalize that.
    Trolltech turned out to be ok, but untill you have the licenses actually reflect that you just can't be sure and it would be foolish to blindly trust them.

    --
    Secure messaging: http://quickmsg.vreeken.net/
  6. "Intel Dev" in Headline is misleading by t_hunger · · Score: 4, Interesting

    Dirk stated in his presentation that this is his own, private opinion he is presenting here and not that of his employer Intel.

    So the headline is technically correct, but that Dirk works for Intel is not relevant in this context at all.

    --
    Regards, Tobias
  7. Not all that surprising by Octorian · · Score: 4, Interesting

    Gtk+/GNOME (in popular form) basically exists because of a flamewar, so is it any surprise that the community is still like that?

    It always struck me as a bunch of stuck up C developers who outright refused to use C++, on principle alone. So instead, they implemented everything C++ does on top of C, using macros and coding conventions. They later managed to spin their crusade as "actually" being about the licensing issues with Qt at the time. While those licensing arguments may have been valid, to me they always felt like little more than a cover for a C vs C++ fight. However, it made their side of the story a lot easier to sell.

  8. Re:GTK is trash by znanue · · Score: 5, Insightful

    That was because the FSF was spreading FUD about Trolltech. Trolltech was free software friendly and was never going to make Qt non-free.

    Licenses matter, especially for businesses. You have to know that this piece of software you want to build things around, to rely on, isn't going to be taken from you. And, you shouldn't have to be a "judge of character" for a business in order to have that security. FUD is a heavy characterization that seems to devalue the perspective of those who do feel they need to operate under license security.

  9. Re:GTK is trash by Kjella · · Score: 4, Interesting

    That was because the FSF was spreading FUD about Trolltech. Trolltech was free software friendly and was never going to make Qt non-free.

    Qt was free on a free platform (Linux), if you wanted a Windows/Mac license then for a long time you had to pay for that priviledge. They were trying to balance being open source and making money and RMS isn't exactly known for ideological compromise. Eventually they went GPL on all platforms and later LGPL, but it also killed off most of the income Trolltech used to have. That wouldn't have been so bad if Nokia had been their sugar daddy using it as their "Android", but I really wonder if Digia can surivie as being the non-native alternative all around. After all Android uses Dalvik/Javaish, iOS and OS X uses ObjectiveC/XCode, Microsoft uses C#/.NET and Qt is essentially trying to be what Java tried to be on the desktop. And I guess we all know how many Java desktop apps we use, right? Good product, not sure it hits a market.

    --
    Live today, because you never know what tomorrow brings
  10. Native Widgets by robmv · · Score: 4, Informative

    Can we stop spreading false information about QT?

    the native widgets for OS X / Linux / Windows

    QT doesn't have native widgets for any platform, QT draw the widgets with their own code, it only skins them with the platform APIs if they are available, Quoting myself:

    Native controls means more than to have the same look, if that is the way to measure "nativeness", then Java Swing UIs (Windows/GTK L&F) are native because they call platform theme APIs.

    When a toolkit draw controls by itself, the applications normally lose a lot of UI functionality, for example, if Android/iPhone controls add proper default assistive technology metadata to their controls, the toolkit (QT in this example) need to do the same for each control they draw, because the OS don't see buttons as buttons, It see them as a custom control. If the platform control change behaviour in a new OS release, the QT control will not see it, for example when Windows added default context menus to the text fields, self drawed controls don't expose that behaviour until applications are updated with a new version

  11. Re:GTK is trash by hubie · · Score: 4, Insightful

    inherited from old-timer UNIX neckbeards.

    Old-school UNIX guys had full beards.

  12. Re:GTK is trash by tibit · · Score: 5, Informative

    Do you even know what "existing toolkits" looked like at the time? They were solid crap. I'm no fan of GTK, but man, reuse of platform-provided functionality in a multi-platform toolkit is usually something you do at the beginning and then quickly backpedal on. There is a very good technical reason why Qt comes with its own raster rendering code, its own event loop, its own containers and atomics, and a host of other things: the platform stuff, if present, is broken in its own way on each platform Qt runs on. Or, if it's not broken, the standards the platform libraries follow simply leave too much to undefined- or implementation-defined behavior to, you know, actually use in practice. For C++ standard library that may be a bit of a less of a problem with modern compilers, but remember that even Qt 4 has to compile on some very broken compilers and very quirky platforms.

    --
    A successful API design takes a mixture of software design and pedagogy.
  13. Re:GTK+ is standalone by t_hunger · · Score: 5, Insightful

    I would argue exactly the other way around: Qt is stand-alone and GTK is not. If you want to write any app you need more than the UI. You actually want the application to *do* something but render a couple of widgets.

    With GTK you end up hunting down a host of glib/gnome based libraries, all with slightly different peculiarities and all of them coming with little useful documentation. How is that stand-alone? With Qt you get everything in one convenient package (and are still free to leave out the parts you do not need in your binary packages).

    Qt is a C++ library: Any C++ compiler can compile it on a wide range of platforms. How would that be possible if Qt was written in a weird dialect?

    Of course the object model leaks into the language bindings. How could it not be? The same is true for "object-oriented" libraries written in C.

    Yes, even with Qt you can not get perfect cross-platform applications. You will need to some platform-specific code in any non-trivial application. That is perfectly possible in Qt... and it still gets you at least 90% of the way! That was the other reason for switching that Dirk gave in his presentation: That GTK does *not* run properly on windows nor on Mac. He claimed that some core GTK people are actually opposing the toolkit working on those platforms and that independent teams are trying to maintain the cross-platform parts as good as they can against a hostile core team.

    Subsurface was cross-platform with GTK and it looked like shit on *all* platforms incl. Linux. The Qt port looks way better -- they could finally get the UI they wanted but could not manage to implement in GTK -- and works equally well on all three target platforms. Check the demo right in the middle of the video: Dirk shows of the new UI and contrasts it with the old one in pretty gory details. So, yes, Qt is not perfect, but it is pretty good nontheless:-)

    --
    Regards, Tobias
  14. Re:GTK is trash by cheesybagel · · Score: 4, Insightful

    Well GTK+ was better than Motif that's for sure.

  15. Re:GTK+ is standalone by Gravis+Zero · · Score: 4, Informative

    it has its own object model, networking stack, container library, threading library, graphics primitive library (i.e. not Cairo).

    the toolkit is split into modules that can be used completely independently of each other. If you only want the GUI stuff, you can use just the GUI module.

    This object model also leaks into its language bindings if you don't want to write your software in C++.

    binding are completely third party software to Qt. you might as well complain about gtkmm while you're at it.

    It's the same problem that Java and C# also suffer from: they're not cross-platform, nothing is. What they actually are is their own platform built alongside a perfectly good already-existing one, and you can see the seams. There's more to each platform's UI than what bitmap you skin buttons and checkboxes with.

    obviously you have not used Qt in the last five years.

    where is the "-1 Ignorant" mod?

    --
    Anons need not reply. Questions end with a question mark.
  16. Re:GTK+ is standalone by BravoZuluM · · Score: 4, Informative

    How is this insightful? GTK guys modding this up? FUD. Qt is not written in some weird dialect. Where'd you pull that factoid from? I compile QT all over the place, Windows, Mac, LInux and embedded Linux using the VS C++ compile or gcc. On each of those platforms, it works VERY well. It's cross platform; more so than any other framework/language I've worked with. Qt apps look like Windows apps on Windows, Mac apps on Mac, Linux apps on Linux (if there really is such a thing)

  17. Re:GTK is trash by cheesybagel · · Score: 4, Informative

    Qt is LGPL now. It used to have the Q Public License, then GPL, now LGPL. They switched to GPL after they saw MySQL managed to retain profit with a GPL license and they switched to LGPL after the Nokia aquisition AFAIK.

  18. Re:GTK is trash by cheesybagel · · Score: 5, Interesting

    The license issues were bad enough at one point that the KDE developers themselves started developing their own OSS version of Qt called Harmony. After Trolltech made the license more open Harmony folded.

  19. Re:It's true! by t_hunger · · Score: 4, Funny

    So Linus and Dirk are not compatible with 'old'-style linux users? That is hilarious.

    --
    Regards, Tobias
  20. Re:GTK+ is standalone by Brandybuck · · Score: 5, Insightful

    "weird dialect of C++98" - WTF? What is this dialect you speak of? Do you need to pass --weird to G++ to get it to compile? Of course not! It's using the same C++ every other C++ app in the world is using. Both C++98 and C++11 are supported. It doesn't REQUIRE you to use C++11, but that is a benefit not a drawback.

    "it has its own object model" - Of course it does, that's because C++ does not have one of its own. QObject is there to provide for the introspection that C++ lacks. Once you have that introspection you can start communicating with other objects. I fail to understand why this is a disadvantage in your eyes.

    "networking stack" - Of course. Why should it not? It is an cross-platform application framework.

    "container library" - When Qt began the STL was fragmented, not standardized, and poorly supported. Yet containers are useful. Qt kept them around because they turned out to be better than the STL containers. They're a balance between raw performance and the "bloat" of pure templatized containers. Externally they end up being 100% compatible with the STL.

    "threading library" - It was only extremely recent that C++ got its own threading, and it's just very low level threading. Qt threading provides a nice usable wrapper around threads (which are native C++ threads underneath if built with C++11), and the ability to easily communicate between threads with signals/slots.

    "graphics primitive library" - Why not? Seriously, why not? Isnt't that the whole point of a GUI toolkit? Underneath it draws widgets using the native controls, if available, or uses its own if not. That's why the widgets look like native controls on Windows and Mac, because they ARE native controls! On X11 it will draw its own. It doesn't use Cairo, why should it use Cairo, who made Cairo king that we all have to bow down before it?

    --
    Don't blame me, I didn't vote for either of them!
  21. Re:It's true! by Grishnakh · · Score: 4, Informative

    no not retards, simply 'old'-style linux users,...

    Qt was initially released in May 1995. It's not exactly a product of young people, and is almost as old as the Linux kernel itself. GTK was initially released in April 1998, almost 3 years later. The GTK devs are the new kids on the block.

  22. Re:GTK is trash by s1d3track3D · · Score: 5, Informative

    instead of reusing an existing toolkit

    GIMP version 0.54 (January 1996) "It had a dependency on Motif for its GUI toolkit, which made efficient distribution to a lot of users impossible."

    A New Toolkit - The 0.60 Series:
    Peter got really fed up with Motif. So he decided to write his own. He called them gtk and gdk, for the Gimp Tool Kit, and the Gimp Drawing Kit. Peter tells us now that they never intended for it to become a general purpose toolkit - they just wanted something to use with GIMP, and it "seemed like a good idea at the time". GIMP History

  23. Re: It's true! by t_hunger · · Score: 4, Insightful

    You are aware that you this is a project founded by Linus himself and that Dirk is involved with open source development since 1988, often working at the kernel and other core infrastructure you are likely to use if you run Linux?

    I somehow doubt that these two are not aware of how open source works. I am further convinced that they are bright enough to figure things out on their own by reading the code and/or using the internet.

    --
    Regards, Tobias
  24. It was like this a deacde ago, too. by Lendrick · · Score: 4, Interesting

    My experience with asking for help with GTK was having random people rudely tell me that I should go read the documentation (which, incidentally, I *did* read, and it was woefully incomplete). Qt actually has good documentation, but in the rare instances when I need help, people are always happy to assist. I wouldn't touch GTK again with a ten foot pole.

  25. Re: It's true! by the_B0fh · · Score: 4, Insightful

    What I got out of the talk, GTK vs QT:

    GTK
    1) Lousy documentation
    2) Lousy code
    3) Lousy developer community support

    QT
    1) Good documentation
    2) Good design
    3) Great developer community support

    Are you really saying Linus Torvalds "feels ENTITLED to the time of open source volunteers, when they don't make every effort possible to answer their own question."?!?!?!

    Any other developer, you might be able to say that, but Linus wrote the kernel himself, and still answers emails (I've had responses to questions I sent him!)

    So, stop justifying and defending the GTK people.

  26. Re: It's true! by the_B0fh · · Score: 4, Insightful

    Put it another way. When Linus Torvalds and 3 of the core GNOME maintainers *CANNOT* figure out how to do something, and Linus asks for help from the GTK community and got a "meh", your community sucks.