Slashdot Mirror


GUI Toolkits for the X Window System

TeachingMachines writes "Leslie Polzer has written a nice summary of the current state of GUI Toolkits for the X Windows System (article title of the same name). Those of you who are planning to spend hours and hours scouring the Internet for a mature cross-platform GUI toolkit may save some time and trouble by reading this summary. Leslie's review covers the pros and cons of using GTK+, Trolltech QT, FLTK, wxWindows, and the FOX Toolkit."

27 of 353 comments (clear)

  1. One thing missed by Doesn't_Comment_Code · · Score: 5, Insightful

    The one thing I don't like about toolkits (not mentioned in her list of cons) is that if you distribute the source code, whoever is compiling needs to have the toolkit.

    I've tried to compile and install programs before and spent a lot of time trying to track down the toolkit libraries.

    This is not a good reason to abondon using toolkits, but it is one negative aspect to take into consideration.

    --

    Slashdot Syndrome: the sudden, extreme urge to correct someone in order to validate one's self.
    1. Re:One thing missed by mark_lybarger · · Score: 1, Insightful

      are you trolling or some such? every application that uses libraries needs those libraries to run. this is more a bad statement about use of libraries in general than anything to do with window toolkits.

    2. Re:One thing missed by Sean+Starkey · · Score: 3, Insightful

      This is a strange comment. It is like saying, "The one thing I don't like about C++ is that if you distribute the source code, whoever is compiling needs to have the compiler."

      Of course you need the toolkit library if source code uses it.

    3. Re:One thing missed by mark_lybarger · · Score: 3, Insightful

      normally you know that going into the effort. and i would guess that there's typically an easy way to get those things installed properly (apt-get, install shield, emerge, rpm, etc, etc). yes, if you're developing a kde/qt app, or a gtk+ app or a wxWindows app your user base will be slightly diminished. if someone wants the app, they'll get it. hell, the postgresql has a database management utility that's based on the wxWindows toolkit and has a nice and easy windows installer.

  2. For Pure Sadism - by EnderWiggnz · · Score: 1, Insightful

    Try using KDevelop 1.2!!!!

    yippeee!!!! wheeelah....

    yeh baby!!!

    --
    ... hi bingo ...
  3. -1 Troll(tech) by CausticWindow · · Score: 5, Insightful

    This article reads like a Qt flamefest.

    I don't see how Qt's "business like homepage" should have anything to do with how good a toolkit Qt is. The "free for linux not for w32" is of course a valid point, but it's the only one.

    --
    How small a thought it takes to fill a whole life
    1. Re:-1 Troll(tech) by LizardKing · · Score: 5, Insightful

      This article reads like a Qt flamefest.

      Certainly does. He also dislikes C, yet he programs using GTK+. I guess he must be a fan of gtkmm. Frankly, I get the impression that the articles author is a little bit inexperienced, and would be better off learning Java and its Swing API. That will give him a decent grounding in MVC architecture, while keeping him otherwise occupied so that he doesn't write any more articles :)

      Chris

    2. Re:-1 Troll(tech) by Des+Herriott · · Score: 4, Insightful

      Yep, the author obviously has some kind of beef with Qt.

      "Commercial" and "proprietary" are not at all the same thing, but the author believes you need to pay to sell Qt applications. Wrong - you are permitted to sell GPL-licenced software.

      The fact that the toolkit is large and takes a long time to compile (a few hours on a moderate-spec PC) is irrelevant. You don't need to recompile your toolkit every day, and you get binary Qt packages with most Linux distributions anyway.

      "Business-oriented main website" is a non-argument, as you say.

      "Main branch depending on one company" is a non-argument, since even if Trolltech folded tomorrow, a GPL-licenced Qt can be picked up by volunteers, just like any other free toolkit.

      The namespace concern is the only minus point with any merit - on the other hand, I don't see Gtk+ using namespaces either, and that wasn't mentioned as a minus point, was it? (Yes, I know Gtk+ is written in C - but that doesn't alter the fact that it too does not use namespaces)

      This article wasn't a summary, it was a soapbox rant.

    3. Re:-1 Troll(tech) by Xerithane · · Score: 4, Insightful

      I don't see how Qt's "business like homepage" should have anything to do with how good a toolkit Qt is.

      Considering that Trolltech is a business, I think it does reflect the quality of Qt. If Trolltech was a business, and their website looked like half the other OSS projects out there, nobody would take them seriously.

      The "free for linux not for w32" is of course a valid point, but it's the only one.

      That isn't even a valid point. Qt 2.3 for Win32, free.

      --
      Dacels Jewelers can't be trusted.
    4. Re:-1 Troll(tech) by i_really_dont_care · · Score: 2, Insightful

      "Commercial" and "proprietary" are not at all the same thing, but the author believes you need to pay to sell Qt applications. Wrong - you are permitted to sell GPL-licenced software.

      Yeah right, good luck...So then why do you think QT sells you the right to use another license than the GPL?

      Seriously, GUI toolkits are quite trivial things nowadays. There are alot of them, and most of them are just fine for usual tasks. Even if QT may have some slight advantages in one place or another, I seriously doubt this difference is worth thousands of dollars. Heck, even Lesstif is LGPL. Also, with GTK+ and wxWin finally catching up, I doubt that Trolltech would have that many customers if it weren't for KDE. And I dare to predict that the more popular Linux gets, the more apparent this problem will get, because people will be running KDE, but all commercial software will be based on GTK etc., destroying all the potential for this superior desktop...

  4. writing graphics software by dollargonzo · · Score: 4, Insightful

    one of the biggest problems in writing a RAD graphics software is that lots of users want it to interface with a lot of different toolkits, such as motif, qt, gtk, tk, xt, etc. obviously, it would be nice if they all just chose one, but that will not happen anytime soon. now, we[the company in mind] are thinking of writing our own low level toolkit (since the software currently doesn't have its own widgets). this is basically how new toolkits come into existence and the user base is forced to choose at yet another fork in the road. *sigh*

    --
    BSD is for people who love UNIX. Linux is for those who hate Microsoft.
  5. Need monolithic executables by Anonymous Coward · · Score: 2, Insightful

    I'd be nice to be able to static link into
    one giant executable. I hate having the
    incompatible libraries problem. It's like
    DLL hell in windows. It'd be nice to have
    a full featured GUI library (and other tools)
    that can create one big executable file.
    GTK programs require a DLL in windows.
    WxWindows programs require GTK libraries on
    Linux.

  6. Documentation by lunenburg · · Score: 4, Insightful

    For me, it came down to documentation. I have a moderately complicated GUI Perl app (Perl because it was the language I was most familiar with). I looked into various toolkits, like wxPerl, GTK/Perl, QT/Perl, but ended up using good ol' reliable Perl/Tk.

    The big advantage with picking up Perl/Tk was that the O'Reilly books were extremely informative - good examples on each widget, how they interoperate, how to use them, and larger program examples. The documentation for the other toolkits I considered basically consisted of "look at the arguments this C++ function takes, and use it," which didn't make for an easy time picking things up (wxPerl was the worst in that regard). While an experienced C++ programmer might not have a hard time with that, it was way over my head.

    As a result, though, I have a decent app that runs on X11 and Win32. With the great PAR archiver, I can even package the app up in a nice bundle.

    Good times.

  7. What, no {Mo,Less}tif? by AJWM · · Score: 3, Insightful

    Yeah, I RTFA and know he disses them with "too hard, too much like Xlib" (actually they're built on Xt, which is built on top of Xlib).

    But anybody who thinks Xt is "too hard" probably is out of their depth programming GUIs anyway. (Now, if you think it's ugly, that's a whole 'nother discussion...) And nothing else gives you that level of flexibility and control. (Well, nothing else sane -- if you want to code direct to the X protocol, go right ahead...)

    --
    -- Alastair
    1. Re:What, no {Mo,Less}tif? by muonzoo · · Score: 2, Insightful

      Took the words right out of my mouth. I've be writting GUIs and graphics applications for X since X11R3. Xlib has a bit of a curve to it, but if you have any background at all in computer science and graphics, it isn't too hard to understand the abstractions. The X Window System has a long and interesting history.

      Xlib still has a lot going for it, espcially in terms of availability on the various UNIX variants out there and one of it's often overlooked features, especially by younger less experienced developers: network portability. This feature is absolutely wonderful inside a corporate or research environment where your workstation isn't necessarily where you run your code and/or do your work.

      Xlib + Xt + Motif + MotifTools (or whatever they are called today) is still a viable, useful toolchain for developing applications. Canada's latest civilian Air Traffic Control Enroute system (CAATS) uses Xlib + Xt + Motif for it's extremely customized UI. (It's not for the faint of heart -- no help ballons there). The Canadian Military also adopted a system based on the same underlying technology (from the same vendor) for it's ATC enroute and local control.

      As always, the right tool for the right job, but also, the right developer for the right job helps a lot too. You wouldn't let a kid loose with a jackhammer, so why let an inexperienced software developer loose with Xlib + Xt + Motif? :-)

  8. Making Money == Evil? by avdi · · Score: 5, Insightful

    The article's biggest strike against Qt is "Very business-oriented main Web site". What the hell is that about? "I'm shocked, shocked! to find marketing going on in this business!". Clue to the author: Qt is made by a company called Trolltech. Companies exist to make money for their employees and shareholders. One of the ways they do that is by (gasp) marketing themselves on the web. That particular company has gone to great lengths to accomodate free software developers; but they still have to make money somehow. If you object to their business model, just say so. But objecting to the fact that their corporate website is "very business oriented" is like objecting to the fact that Slashdot is "very geek oriented".

    --

    --
    CPAN rules. - Guido van Rossum
    1. Re:Making Money == Evil? by WNight · · Score: 3, Insightful

      What's is it with all of the "Poor Trolltech" sentiment in this thread? If their GUI library isn't available on Windows without paying money for a development kit and a license it's not as useful as free cross-platform libraries.

      If I write some neat program for myself and friends in Linux, it'd be nice to do it with a GUI library that'd let me, with a minimum of porting hassles, release it for friends in Windows as well. Not worth the $1500 dev kit, but still handy.

      Or perhaps if I was starting as a shareware developer. $1500 isn't much when the money starts coming in, but it's a lot up front.

      Being that portability to Windows is a handy thing, I think the issue of QT being a business and charging for that ability is directly on topic.

      Yes, we know, for the trillionth time, that the job of a company is to make money, yada, yada, yada... That doesn't mean that our job is to supply a company with money.

    2. Re:Making Money == Evil? by denshi · · Score: 3, Insightful

      Hi.

      Qt was around years before KDE. And Trolltech was a smaller, but still successful, company back then. I was programming Qt back in 1997? 98? It was rock-solid even then. GTK+, which, I might add, was being developed for political reasons, was kind of a permanent, bloody migrane to work in. And let's focus in on the reasons again. Qt was there. Then KDE happened. Then Miguel and co pitched a fit that this well-designed app was becoming a new Linux standard, and screamed bloody hell that it was based on a non-GPLed toolkit. Qt was free on Linux, but That Wasn't Good Enough. They borrowed the toolkit from GIMP, called GTK internally, renamed it as GTK+, decided to keep it in C, and started work on it and GNOME in order to preserve GPL sanctity on the Linux desktop. Scroll forward two years. You find that KDE has continued lightyears ahead of GNOME, and that in response to the GNOMEitistas, Trolltech has first created the QPL, which the OSI rated as open-source, but since That Wasn't Good Enough, Trolltech then released Qt under the GPL, but somehow that STILL Wasn't Good Enough for the GNOMEitistas, and so the silly war continued...

      I don't know if you've been around that long. But there's the background on the FUD. There's a bit of a tendency in the slashdot crowd to just accept the years old FUD and not think about it too much.

      "The community at large" I guess kind of means whatever you want it to mean. If you mean "GUI developers", then, no, C is not the standard, C++ has been the standard for years. Passing C++ references and calling object methods is the way most GUI programming is done, not writing preprocessor macros to magically objectify sickeninly complex C structs and chasing function pointers around the app. If you mean, "open source programmers", then no, C is still not the standard, C++ and Java compete with all the scripting toolkits out there now. If you mean "slashdot bigots with poor grasp of history", then yes, you could say that C is the standard.

  9. Re:Why would you want to use anything but Swing? by truth_revealed · · Score: 5, Insightful

    Why a native C/C++ GUI toolkit?

    - can distribute a statically linked 2 meg executable - quick to install
    - typically only 2 megs of resident RAM used by running program
    - virtually zero startup time
    - much more responsive GUI
    - still runs well on hardware more than 4 years old

    Why not Swing?

    - don't want the 40 meg downloadable JRE footprint
    - don't want Java version hell for your users/customers
    - don't want the 40 Meg of resident RAM required by the smallest running Swing program
    - requires the latest hardware for decent speed.

  10. Fonts! by r6144 · · Score: 2, Insightful
    On linux the best looking fonts are anti-aliased TrueType, which Swing doesn't support. Bitmap fonts also look good when not scaled, but it is also very non-obvious (if not impossible) to make them the default in Swing apps. So we are left with ugly non-antialiased TrueType fonts. Ugh!

    (Well, maybe it is the fonts that are not as good as Windows fonts... But if you want to work with international text, even Window's unantialiased non-bitmap Chinese fonts look VERY ugly.)

  11. Agreed. And that's not all... (rant) by Balinares · · Score: 4, Insightful

    I have to agree. Sounds like someone with an axe to pick and yet trying to come across as an "oh look at me I'm knowledgeable and unbiased!" kind of writer. Feh.

    So, let's see.

    First of all, isn't it funny how the author omits to mention how a clean and thoroughly engineered class hierarchy can help you design more modular software that will be much easier to maintain and refactor? Or do people really think that the KDE project has been improving at the pace it has by mere luck?

    > Very business-oriented main Web site

    That's a problem how? Do you really MIND that the site provides info for people other than geeks, along with, you know, a completely up to date documentation for each version?

    > Main branch depending on one company

    This is either pure ignorance or a lie. Typical underhanded FUD. The main branch is GPL'ed, and the KDE Foundation was established to keep the main branch GPL'ed no matter what happens to Trolltech.
    http://www.kde.org/whatiskde/kdefreeqt foundation.p hp

    > Commercial developers and people wanting portability have to pay

    Commercial developpers *ARE* allowed to sell GPL apps, dammit. THIS is the way of Free Software business.
    And Qt 2 is available under for GPL on all the main platforms. That's for portability. Only Qt 3 for Windows requires a commercial license (this wasn't always the case, but according to interviews I read some Windows developpers would routinely use the GPL version in closed source apps, so Trolltech had to discontinue the GPL license on Windows. Thank you, guys. Thank you so much.)

    > Huge sources and binaries, library itself takes ages to compile

    That's C++ for you, dude. Install a binary package next time.
    Additionally, and just because I'm pissed and am most willing to nitpick the bullshit out of existence, 1) Qt ships will ALL the major distribs, and a majority of minor ones -- no need to recompile it, and 2) You don't need to recompile it either for use with older software, as the API is backwards compatible -- which is not the case of all the APIs out there, which he blissfully omitted.

    > Objects not referred by namespace but simple literal prefix "Q"

    And that's a problem how?

    > Dominant Microsoft Windows look

    This is either pure ignorance or a lie. I won't even enumerate the number of looks Qt comes with *natively*.

    In fact, this is so close to the usual Qt FUD you can hear from certain people that I strongly suspect that the whole purpose of the article was a clumsy attempt at slowing the growing popularity of Qt. Well, sorry, but such retarded FUD won't last three minutes on Slashdot. We may be a bunch of bickering nerds at times, but we know our shit.

    If you don't like Qt and are concerned about its growing supremacy, which is your absolute right, then contribute to competing projects to help them improve. Trying to smear shit on competitors will only make your side look desperate. Is this what you want?

    Rant other. Let the moderation begin, I have karma to burn.

    --

    -- B.
    This sig does in fact not have the property it claims not to have.
  12. Stop spreading lies by Anonymous Coward · · Score: 2, Insightful

    If you had the decency to give correct numbers,
    your post would be much more relevant.
    - the JRE download is 14,153,852 bytes for the latest version. And you download it once for all
    java applications. How big is Qt?

    - there is no Java version hell. Java is much more mature when it comes to different versions. You can still run Java classes compiled with version 1.0.

    - 40meg memory? Speaking of Java 1.2, you might be right. Nowadays memory usage has been greatly reduced. Futher work is on the way

    - latest hardware? Java runs sufficiently fast on my 700Mhz Duron box.

    So, get your facts straight before posting.

  13. Re:Why another QT license? by Xerithane · · Score: 2, Insightful

    My question is, why another license? I actually like QT. I use KDE every day and I write for QT for my private purpose. And I don't care if they charge billion dollars for Windows version. But why did they HAVE TO create yet another license that pose such a strong restriction like "you cannot earn even 1 cent using this software" when it seems (at least to me) that the GPL would have sufficed (and less restrictive)? Would somebody please enlighten?

    It's their lifeblood. They are trying very hard to create a commercial quality toolkit for cross-platform development. Their big threat to profits is not gaining compensation for Windows applications. Since Windows is the dominant desktop platform, that is why they want money for Windows development.

    I think that it is a touch silly, but I do understand where they are coming from. If you want to do Windows development, you have to pay. Windows is a proprietary/commercial platform so they are just staying with the paradigm.

    --
    Dacels Jewelers can't be trusted.
  14. Re:Xlib API still K&R by penguin7of9 · · Score: 2, Insightful

    The article says the Xlib API function prototypes are still K&R.

    The Xlib API still has support for K&R, but it also has prototypes.

    In fact *any* improvement to Xlib be great for everyone. This suggest it would be a great area for somebody like IBM to fund.

    Xlib is just a C library for accessing the X11 protocol. There are several libraries and toolkits that don't go through Xlib at all (e.g., CLX, Escher). But Xlib is pretty good at what it does; it's complicated because X11 has a lot of features.

    There has been some work on a new low-level C library for accessing X11 servers, but the community just doesn't seem to have that much interest.

  15. Never let programmers design GUI's by Ilan+Volow · · Score: 2, Insightful

    You made the fatal mistake of letting programmers design user interfaces. Always let programmers design algorithms, and let them design precious little else.

    Honestly, it won't really matter what kind of information you show those guys. They'll heel drag even if Bill Gates walks into their office and tells them they're completely wrong.

    What you need to do first is design the UI at the start of the project, before any code is written. Once major code is written, most programmers are going to be obstinant as hell about going back and changing something just because someone with far less computing knowledge than themselves has trouble with it. When you do this preliminary design, do it on paper and pencil. Paper by its nature is extremely non-modal, which means whatever design you do will probably result in fewer annoying dialogs and will feel more natural to the end-user. Also, if you do a design on paper, you'll have less reservation about changing the design (as opposed to if you did a mock-up in photoshop, visual c++, Glade, etc) because you put less work into it.

    The next project you work on, you might actually want to go ahead and hire a usability specialist who will do much of this annoying stuff for you and might do some testing of the proposed UI on Normal People(tm). If you do this, again make sure you bring the guy in at the start of the project; too often usability specialists are brought in to play damage control after way too much significant code is written, and there's not much they can do because too much code has already been written.

    Finally, buy this book and show it to some of your programmers. Most of them will probably not come around to your side, but at least you can say you tried.

    --
    Ergonomica Auctorita Illico!
  16. Totally missed the point of Qt by frostfreek · · Score: 3, Insightful

    Qt has THE BEST object-oriented design that I have seen, by far. The widget hierarchy, methods, etc... have a very clean and consistent implementation. Also, the documentation is fantastic! It is always current wrt. the library.

    - The ease of code integration into Designer by OO derivation is fantastic.
    - The speed at which GUI apps can be developed, using TT's Designer is great!
    - The qmake program, while not as capable as automake etc..., is still simple and easy to use. Plus, it takes care of his whining about extra steps.
    The 'strengths' section on Qt is hopelessly lacking.

    I know that Gtk+ is also OO, but to me it seems they bend over backwards to use C++ features from C, creating a bit of a mess. It is not as clean or consistent, either.

    As well, while I H8 Motif, the fact that it was overlooked in this review is pretty bad.

    A BIG FAN of Qt,
    Jamie.

  17. Re:Exactly by AvitarX · · Score: 2, Insightful

    Why don't you do what normal software distributers do?

    Include GTK 1.2 and then have your instal check if it is needed, if it is install it.

    Like when I buy a game I get DirectX with it. I guess installing that library is gonna kill me.

    There is no reason you can't include GTK 1.2 since it is Open source.

    Of course the bugginess is another issue, and obviously if that is the case you cannot use it, but I see no reason you can't make it easy to install by modifying your make script.

    Even the Gimp was an easy install in Windows once I found all the packages, but someone could have bundled them together easy enough.

    --
    Wow, sent an e-mail as suggested when clicking on "use classic" banner, and got a fast response that addressed my msg