Slashdot Mirror


GTK-- vs. QT

spirality asks: "The company I work for is getting ready to decide on a GUI Toolkit for our Computational Modeling Toolkit (CoMeT, www.cometsolutions.com). We would like C++ compatibility and ports to various Unices and Win32 platforms. Not supprisingly we've come up with two choices, GTK-- and QT. I've attempted to compare the two by doing alot of web surfing and searching, but I've come up with things that are consistently one or more years old. So, the question I pose is what are the (dis)advatages of GTK-- and QT, and why would I choose one of these toolkits over the other? Overall functionality, momentum for future growth, ease of use, licensing, and pretty much anything else is relevant to our decision." With QT now at version 3.0 and GTK now in the 1.2.x revisions, maybe it's time to give the two libraries some fair comparison and discuss the new features, advantages, and disadvantages of each?

4 of 325 comments (clear)

  1. Before the flame wars start... by CaptainAlbert · · Score: 5, Insightful

    My suggestion - try them out.

    Come up with a few small use cases and let your developers loose on everything you can get your hands on. Both Qt and GTK+ are freely available enough for that to be a useful exercise.

    You might find that, while Qt has nicer abstractions, and provides a familiar set of classes which are (IMO) far superior to MFC... perhaps GTK has a slight edge for lower level work (which it sounds like you might get involved in). Also, see which interface builder tools your team feels most comfortable with.

    The problem with this question is that the replies are likely to degenerate quickly into a C vs. C++ rant-a-thon. Yes, GTK is entirely written in C. But it *is* object oriented. It seems strange to everyone at first, but just because a language doesn't support particular features, doesn't mean that you can't use a particular programming style. OO methodology is just as relevant to C programmers as to C++ or Java programmers.

    If your programmers are good, they'll write good code whatever the toolkit. Just make sure everyone thinks that they got a say in the decision. ;-)

    --
    These sigs are more interesting tha
  2. Some REAL points by faber · · Score: 5, Insightful

    Developing for a professional product I would always go with as many professional tools as possible.

    To me QT seems to be the FAR better decision. It has true interoperablity between Win32, MacOS X and X11.

    QT is C++ from the ground up, GTK-- is wrapping GTK++.

    Furthermore with GTK you definitely write more code to accomplish the same.

    QT 3 gives you access to SQL-databases from its widgets.

    QT comes with a very good interface builder.

    QT based programes feel snappier than GTK based ones.

    One drawback might be that you have to preprocess (actually your Makefile has to) your code before its ready for the compiler, but that's not a big deal.

    With Kdevelop you have access to a very good IDE.

    One thing I don't know is how QT works in terms of different GUI threads, but I neither know for GTK.

    So please, go with QT and be happy

    A much harder decision would be: What should I use for my Web-Frontend, mod_perl or PHP... but that's a different story!

    1. Re:Some REAL points by Sentry21 · · Score: 4, Insightful

      > QT is C++ from the ground up, GTK-- is wrapping GTK++.

      So?


      QT is OO by design. GTK-- is OO by kludge.

      > QT 3 gives you access to SQL-databases from its widgets.

      Why?


      To make it easier to build database-driven applications without having to twiddle between two libraries.

      > QT comes with a very good interface builder.
      Use vim.
      > With Kdevelop you have access to a very good IDE.
      Use Vim.


      Look, I love g/vim as much as (or more than) the next guy, but it is not an IDE designed for QT, and it is NOT an interface builder at all.

      > QT based programes feel snappier than GTK based ones.
      Opinionated


      An opinion many people, myself included, share. GTK feels sluggish, slow, laggy. QT actually feels like you're interacting with the program.

      > Furthermore with GTK you definitely write more code to accomplish the same.

      Maybe, maybe not.. and if so, who cares? Maybe some people like to have a lot of options/power at their disposal.


      It's not a matter of options/power, it's a matter of more code to do the exact same thing for no reason. GTK is godawful ugly. I can't speak for QT, but everyone I talk to who's used it agrees. You can do more with less and better.

      Gtk is more commonly used then any other brand.

      That's because when QT started out, it wasn't Free as in Speech, so GTK was used instead. Now, GTK is ugly, bloated, and slow, and QT is fast. KDE still sucks, but QT works, and well.

      Sure it sucks, but it sucks less.

      No, it just sucks in more places at once. MS is more commonly used than GTK, doesn't mean it's better, just that it's more common. Same with GTK. It's better than a lot of options, but it's still #2 in my book.

      Don't get me wrong, I love GTK and I hate KDE, but QT just feels nicer and works nicer, and as much as I'm loathe to, I have to admit that.

      --Dan

  3. Re:Qt if you need Win32 by Orycterope · · Score: 4, Insightful

    Being cross-platform is a major selling point for commerical Qt users, however, so if you need your apps to work on Windows then it's clearly the way to go.

    Absolutely.

    One important thing to note about Qt is the fact that it ain't a wrapper around existing GUI APIs. It emulates the different GUIs out there, so it does the drawing itself, avoiding going through some additional API layers. That translates into a fast and responsive GUI.

    I tried it on both Windows and Linux using the platform's native GUI and GUIs from other platforms, i.e. the Motif or CDE style on Windows, the Windows style on Linux. It is very convincing and very fast.

    When performance matters, I definitely go with Qt.

    Watch out for that "non-commercial" license on Windows though. It might not be appropriate for what you are doing. Your company will probably have to acquire a Qt license for Windows.

    --
    Just because your voice reaches halfway around the world doesn't mean you are wiser than when it reached only to the end