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?
Because Qt guys were doing it wrong, Motif guys were doing it wrong, C++ guys were doing it wrong, .....
I've coded applications with Qt and GTK and I prefer Qt because of its native C++ support. GTK has a C++ interface called GTKMM, but at the time I used it, it had serious issues dealing with third-party libraries.
I prefer C when I'm doing embedded/high-performance computing work. But for large, complex GUIs, I prefer C++. So that's why I go with Qt.
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.
Unfortunately developer communities can tend to get rather hostile. It only takes a few hostile folks to tarnish an entire community. Python is a classic example as well.
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.
Agreed 100%.
Yeah, it is pathetic how Phoronix will link "news" to an "earlier" article to itself instead of the actually dam off-site source.
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
> Less than a year and a half after the FUD started [...]
So it was good to start the FUD, I guess? Should we've started the FUD earlier?
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.
For the longest time the man page listed a timeout parameter but the godlike gnomes decided to simply ignore the parameter, because they knew better...
I couldn't find a good bug but this should give you a hint https://bugzilla.gnome.org/show_bug.cgi?id=665761
I guess the gnomes have taken alot of flak for gnome-shell but some of it is deserved and no excuse to act like total assholes. I wish Karen the best of luck herding these rude, stubborn cats...
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
Explanation: QT Devs are not 13-year olds.
It's not retarded.
It's more retarded to redo every single backend process because each OS has its own "definition" of how to do IPC, for example.
Office has its own clipboard. THAT'S retarded.
Office on Mac has a large part of Windows libraries installed with it so that it can run on Mac as it does on Office. THAT'S retarded.
Compared to those, GTK's practically elite.
List of aspects and properties in which GTK beats QT:
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.
How many people here flamed Canonical 3 years ago when their developers ditched working on Gnome3 in favor of Unity for this very reason? Are you now going to flame Intel because their developers are saying the same thing? I should also point out that this is a prime example of how open source development works; if you don't like what one group has to offer, switch to something else. It is the same reason GTK/Gnome came into existance, the developers didn't like QT (for licensing reasons). It is the same reason Cinnamon and Mate exist. It is the same reason MariaDB exists. And it is the same reason Mir/Unity exists. Note that I do not work for Canonical, but I do work with ALL of the major commercial distributions daily. For ease of installation and deployment to my customers and users, I can't beat Ubuntu.
I looked into Qt about 6 months ago and liked it until I read on one of the main Qt pages that they were not going to do any further development on the C++ side. Instead they were going to focus all their attention on QML. I know QML can be extended with C++ but now when I look at their info I can't find that language.
Have they reversed course on this? Can anyone tell me if Qt is planning on supporting C++ for many years to come or are they trying to get out of C++?
How many people here flamed Canonical 3 years ago when their developers ditched working on Gnome3 in favor of Unity for this very reason?
Canonical did not ditch gnome3: They used all the bits and pieces and just replaced desktop itself. Unity was written in GTK, just like gnome, so there was no productivity win there. And the problem was IIRC more that way the switch was communicated (or better: not communicated) than the switch itself.
Are you now going to flame Intel because their developers are saying the same thing?
It is Dirk speaking here, not Intel. He makes that very clear during his presentation. Dirk just happens to work for Intel -- which somehow makes this newsworthy. This is definitely not Intel that made the announcement to not like GTK anymore.
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
I remember reading an informal opinion/rumor by a Sun Microsystems developer that KDE/QT was the preferred environment, but they were sticking with Gnome/GTK for Solaris purely because of license issues.
the act of anarchy you seems to believe. There is value in starting from scratch. They weren't being paid, and they learned a lot as part of the process. Maybe you don't like the end product, but I'm sure they enjoy the fruits of their exploration: the knowledge and experience they gained.
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.
Windows 8 (and the entire Windows 8.x by extension) may be the prime example of that.
That interface on a desktop computer may be worse than anything else built by Microsoft.
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.
Are you getting payed to say this garbage? Go and read more about open-source before pretending you are involved in it.
Theo now works for GNOME? huh.
What about Tkinter (e.g. in Python 3: http://docs.python.org/3/library/tkinter.ttk.html)? The ttk widgets have a native look and feel across platforms, and yes, you have it in standard Python since 2.7.x or so. Yeah, it's is nothing compared to Qt or GTK in terms of complexity, but shouldn't we strive for simplicity anyway?
Appreciated the presentation, demos of the application running on the different OS's and different GUI toolkits.
Also seems they discovered/re-discovered the concepts of the design pattern of Model-View-Controller while working on it : )
Uh, Linux geek since 1999.
In my day we used Motif, or OpenLook, and we liked it. If'n you want something fancier, there's Tk.
Now all you kids get off my lawn.
The Subsurface developers failed to accomplish things that are common in many GTK+ applications. I'm not sure if that means the various GTK+ language bindings are a lot better than the native C library or what, but it looks like the main benefit of switching to QT was a forced rewrite of the UI.
In-place editing? Not that hard.
The ratings stars? Banshee has it. So does Rhythmbox.
Native look-and-feel is a valid complaint. If GTK+ used the native file dialogs in Windows and OSX, that would help a lot. Adding default themes for those platforms that better mimic native controls (and such themes exist) would also help.
Granted, that says nothing about the community, but from a technical perspective, that talk was worthless.
While the old GTK vs QT and C vs C++ debate continues, the interesting stuff is really happening in the Web space with projects like Mozilla Servo where the UI is parallelised as much as possible. Servo might be rendering HTML at first but it could just as easily render another XML dialect designed for apps like XUL. Actually, it would be nice if they could move away from XML and move to JSON but I digress.
ayottesoftware.com
Well, Dirk Hohndel, nice diversion, but what about this: Intel is a shill for the NSA.
How do you respond?
GTK is horrible. I found it impossible to edit the NATION files in Freeciv and getting them to work without hanging the application. Note that Freeciv uses GTK - even the Windows version of it does.
Shhhh, don't mess up what sounds good with facts.
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.
FTFY. As an added bonus in this post I am going to help you in a way that nobody has (apparently) ever helped you before. I mean this with 100% sincerity. Before you ever stop to think if you might be more qualified than those of us with more than 30 years experience, Read This.
If you can show me a case where the aforelinked content was clearly understood, and the advice followed, where the person didn't provide the kind of help you want then we can talk. Right now, I guarantee you are grousing about them, when it is you that is woefully in err, and you and your "brethren" still just don't get it..
Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
Ironically, they are both much less angry now than they used to be.
Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
http://stackoverflow.com/questions/1051333/combing-an-external-event-loop-with-qts