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."
I don't understand why anyone would use GTK. It's not noticeably easier to use than other toolkits. It doesn't have a "native" look and feel on any system (if you run GIMP on Windows, you'll notice how all the dialogs are much different than what you're used to seeing in other applications). It's cross-platform, but so are Qt, WxWidgets, and probably a bunch of other GUI toolkits that don't come to mind at the moment. So what's the appeal?
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?
What is the matter with all of you? Curses got it right...
The only reason to use it now is if for some reason you want to avoid C++ and develop in pure C.
no not retards, simply 'old'-style linux users,...
Simply folks who think they lend a helping hand when they send you a friendly "RTFM" or multiple links instead of simply helping out even is they could help out and solve the problem in a few sentences. They might think that unless you fully understand every detail they didn't help properly and sure, some times you can only explain a problem roughly and tell folks to read the man-page / manual / wiki for more details, simply because:
a. the problem can't be explained/solved in a simple matter due to it's complexity
or
b. you can't explained/solved the problem in a simple matter, but instead of posting the infos and noting that you just posted the infos as a general help and can't help more you ended up posting just the infos and look like an ass to a newcomer
-> don't think it's only GDK or linux folks with this bad habit (some audio/video/apple forums/channels/mailing-lists/developers,... are not a bit better), but the qt community is made up of more of a variety of characters than the GDK community and so it often delivers a more friendly vibe.
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
Qt, on the other hand, is its own universe. It's written in a weird dialect of C++98 (though I'm sure it works just fine in C++11 these days), it has its own object model, networking stack, container library, threading library, graphics primitive library (i.e. not Cairo). This object model also leaks into its language bindings if you don't want to write your software in C++.
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. If you want a cross-platform application, then write a completely different UI for each platform using those platforms' native UI toolkits. Sadly "good enough" is the order of the day here, so you end up with platform-refugee applications that look like shit.
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.
That's awfully big talk, from the company that unleashed EFI upon an innocent and unsuspecting public.
Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
I never really thought about it but different OS project have vastly different cultures. I have long had a happy relationship with Qt; I was worried a bit after their Nokia purchase, and then really worried after MS bought Nokia; but all seems to still be good. For instance the Python culture is embroiled in a civil war with 2.x vs 3.x. And quite clearly some OS projects are very responsive to customers (For example the warning that git screamed after typing "git add ." disappeared. Other projects like Boost are definitely populated by academics, and so on.
I generally have stayed away from GTK and part of that reason might be that I sensed an unfriendliness there.
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
GTK is far from trash. It certainly compiles and links faster than a Qt app. It can build gui's entirely in your c++ code or integrate with glade-tool-created ui which is on par with qtcreator in that respect. It blends well with c++/c libraries. .apk with the AndroidManifest.xml and other Android "deployment" characteristics for plain c++ built-apps.
I have recently delved into gui development with Qt on Ubuntu touch(ubuntu-sdk) and Qt on Android(Necessitas and Qt for Android). I'm not quite content with either. Newer Qt tools force developers to use QML/declarative script. The ide doesn't offer any easy way to use C++ for everything in Android. It's possible, but it's not very well documented. When compiling and Android app without QML/.ui files, the IDE isn't intuitive to use to get what you need to build the minimum
gtkmm has no complications about assembling everything into an apk file. You just assemble everything c++ into your executable or keep them separate. It's the developers choice unlike android's forcing of everything into an apk. I just prefer desktop app development over mobile device development. Qt doesn't save you time with android. You still need to do your homework and learn everything android anyways. i.e. JNI to get access to special non qml apis. There has been recent discussion about difficulty using persistent storage api with qml. That's so 1990's an issue. There are so many ways of skinning that cat with c++ libs of all sorts. boost serialization and mongodb come to mind, but there are so many others. Even golang(higher-level C++-like) has less problems using gtk and serialization than qt/qml and it has even shorter compile/link times than c++. golang/gtk/serialization compile/link time c++/gtk/serialization compile/link time qt/qml serialization compile/link time.
To be blunt, I would rather compile with gtkmm with Ubuntu/Debian on any device mobile/desktop/cloud given the opportunity.
There will be an opportunity to see gtk on ubuntu touch. I would prefer gtk than qt toolkit on ubuntu touch because it would save enormous amounts of time iterating through compiles/links.
Don't call GTK trash and I won't trash QT. They both have their places, but platforms should not impose language choices on developers like android and ubuntu touch did by forcing everyone to use qt. That was a mistake. All this to say GTK has its strengths and weakness and so does qt/qml/declaratives. It's interesting and useful, but doesn't necessarily save the developer time and qt doesn't necessarily give the best runtime performance if an app has qml/declaratives in it when compared with straight c++. If the ubuntu touch team would have stuck with gtk for the touch interface, I believe they would have finished the ubuntu touch/ubuntu edge prototype completely by now. If Android would get rid of all the apk complexity, provided c++-only gui api and stuck to c++ rather than convoluted java/jni/c++, there would have been even more apps in their play store by now. golang will have greater importance on for building guis/apps on all platforms soon enough. go-gtk bindings exist. So do go-qt bindings. One thing is certain. I don't like QML and that's a subjective thing. Knock yourself out with qml if you want but don't impose it on everyone else. That's bad for business. People will walk away if it's the only developer tool option offered for a device.
I feel like all the time I donated helping with gtk questions on the gtk irc channels was useless now. )-:
So Linus and Dirk are not compatible with 'old'-style linux users? That is hilarious.
Regards, Tobias
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.
More diplomatically put: Qt was originally a for money project aimed at cross-platform application development. GTK is a toolkit that started out being branched off from one single application and is now developed by a bunch of people for Gnome, with little focus on actual application development, or any other platform other than Linux. Even other Unix platforms get shafted by Gnome.
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
Sorry, but that is non-sense. C++ support has always been and will always be a focus of Qt development.
During Nokia times the QWidgets were considered to be "done" in the sense that there were no new exciting features expected to happen. But then widgets are pretty well used for years, pretty complete (all the standard stuff is there and you will need to write the rest anyway) and the APIs were hammered down ages ago. Bugs were going to be fixed as they are reported, so the code was and is fully supported. I think you are referring to this... it was awfully badly communicated back then and did raise quite a ruckus.
That was the state when Nokia was still at the helm: Digia is putting way more resources into "classic desktop parts" than Nokia did and with that widgets do see more love again.
Regards, Tobias
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
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.
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.
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.
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.
If indeed 3 core gnome maintainers can not figure out how to get a application with a pretty simple UI working, then it is not just your community that sucks! Either your product or your core maintainers suck, too.
Qt is also partially commercial while still being open source. This means that there's a financial incentive to treat users with respect; ie, they're customers instead of lusers.
Informative as this is, GP was not saying they were *old* linux users, just they were old-*style* linux users.