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?

325 comments

  1. Bwhahahahahahaha by Anonymous Coward · · Score: 0, Funny
    It looks like it's going to be a troll friday, eh.

    what next Taco, how about a rousing vi against emacs story?


    Oh, first post for Jesus !!!!

    1. Re:Bwhahahahahahaha by Anonymous Coward · · Score: 1, Funny

      I actually agree with you, we just add 2 stories about Open Source viability, a new Linux kernel, some Mozilla release, ...
      Most of this stuff was able to start flamewars so here we have a huge potential.
      Does Slashdot want to declare war on tertro(ll)rism ???
      what about a good old atari vs amiga troll ?
      or windows vs apple ?

  2. QT seems to rule by PRobinson · · Score: 2, Interesting

    I've recently got my Sharp SL-5000D which comes with a cute embedded version of QT. I'm starting to play with it some more, and I have to say I'm impressed. I've not done much GUI dev. under 'nix before, but I've followed many threads in the past elsewhere that suggests GTK is a hodge-podge and is getting out of control, with no coherent design.

    I'm not experienced, but as a lay-man, I'd have to say go for QT.

    1. Re:QT seems to rule by Anonymous Coward · · Score: 0
      But 'dude' (I think this is the correct form of address in these parts)...

      I think you'll find that this is what Slashdot is all about and that the above was a Slashdot post in the classical mould.

      If correct Slashdot protocols are followed, we will now be treated to a spectacularly ill-informed and subjective QT vs GTK flame war.

      Mod me down Scotty!

    2. Re:QT seems to rule by Capt.+Beyond · · Score: 2, Insightful

      You are correct. I have developed with QT for around 3 years now, and back then, I did check out GTK--, and it seemed very much a hodge-podge. I can't imagine it being any better now. I use QT on linux and windows and am going to be porting my program to the SL-5000D. (with the good graces of Sharp) How cool is that?
      If I had a Mac, I'd port it to that.

      --
      -- "Perceptions create reality. By changing your perceptions you change your reality."
    3. Re:QT seems to rule by Anonymous Coward · · Score: 0
      and am going to be porting my program to the SL-5000D

      Just out of interest what does your program do? Do you see any potential problems porting to the SL-5000D?

      Did you intend it to have a cross-platform GUI from the outset?

    4. Re:QT seems to rule by Anonymous Coward · · Score: 5, Funny

      I agree with you 100%. I've neve used GTK, nor do I know anything about it, but I seem to recall that a friend of my brothers girlfriend said he heard from someone that it was rough around the edges and had no development roadmap for the future. But, on the other hand, I did read an article on ZDnet a couple of years ago about QT, so I would say that it's a much better platform.

    5. Re:QT seems to rule by Bongo · · Score: 1

      Great, So basically you don't know anything about GTK and... Perfect, just perfect

      And as a further improvement on perfection, some other 15 year old mods you down "Redundant"!

      But is that "Redundant" because it's already generally and widely understood that useless posts will get modded up?? D'uh, stating the obvious or what.

      Do your dreams have soundtracks?

    6. Re:QT seems to rule by Capt.+Beyond · · Score: 1

      Yes, I had intended to cross platform it. And when TT released the non commercial for windows, I stopped the native windows development tree, and it was a breeze to port the linux version to windows. And it's pretty much a breeze to port it to embedded. I love QT... I'd marry it, but I can't seem to find the finger to put the ring on!
      :D

      --
      -- "Perceptions create reality. By changing your perceptions you change your reality."
    7. Re:QT seems to rule by Woko · · Score: 1

      That's OK. your tears say more than real evidence ever could.

      --
      ---
      Silence is consent.
    8. Re:QT seems to rule by vscjoe · · Score: 1
      Yes, and Qt applications is all that handheld is going to run because TrollTech's proprietary toolkit takes over the entire screen and cannot share it with other, non-Qt applications.

      If you want a nifty handheld with a proprietary toolkit, there are lots of WindowsCE devices out there. And developing for WindowsCE is cheaper than developing for Qt.

    9. Re:QT seems to rule by layingMantis · · Score: 1

      QT rocks!

      well-lit, lots of pumps, beef-dogs for under a dollar, friendly employess (though a bit dorky); overall a very good gas station.

    10. Re:QT seems to rule by Anonymous Coward · · Score: 0

      "I've never used it, but I've heard it isn't good, so it must be bad"

      Now, doesn't that sound (un)intelligent. How about learning to thikn for yourself. I've heard QT sucks hard, does that mean it does? nope.

    11. Re:QT seems to rule by murrayc · · Score: 1

      Your experiences 3 years ago are irrelevant to a discussion of the situation today, as are your wilfully uninformed imaginings.

    12. Re:QT seems to rule by Capt.+Beyond · · Score: 1

      No, it's not. I still find gtk-- to be convoluted, especially when you have_silly_functions_named_like_this_that_are_hard _to_remember() Please, when all you need to use a QT program is the QT libs, but with gtk--, you need several other packages, and libs as well. Not to mention gtk-- isn't really cross platform. Gnome development has stagnated in my eyes. It was overbloated and unstable then as it is now.

      Not only that, but tmake blows away autoconf/automake for ease of use.

      --
      -- "Perceptions create reality. By changing your perceptions you change your reality."
    13. Re:QT seems to rule by murrayc · · Score: 1

      You must be thinking of GTK+, not gtkmm, as one of the main differences in gtkmm is the use of C++ class method names instead of those pseudo class prefixes in the C function names.

  3. First post? by Grab · · Score: 0, Troll

    Is this my first first post? ;-)

    Seriously, I'm interested in this myself - I'm working on a universal chip programmer and I need a toolkit to do this. I'd rather not use VC! :-)

    Grab.

  4. Re:All quiet on the Slashdot front??? by Lispy · · Score: 1

    Im here...but i frankly have to opinion since i only use and never hacked those libs before.

    Maybe its a point to choose a central maintained Lib such as QT if your product is going to be commercial. As far as i can tell Trolltech is doing a good job with it.

    Personally i prefer the GTK as a User, i find the Applications more coherent to use, but thats mostly thanks to Gnome, i guess.

    So, thats as much as i can say about it...wont help you a bit, i bet!
    Have a nice Weekend all you slashdotters out there..

    Lispy

  5. Qt if you need Win32 by Ami+Ganguli · · Score: 5, Informative

    I actually prefer GTK+ and I think it's a better bet long-term, but I don't think the cross-platform aspect of the library gets much developer attention.

    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.

    --
    It is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail. - Abraham Maslow
    1. 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
    2. Re:Qt if you need Win32 by hattig · · Score: 5, Informative
      Knowing companies like I do, they will go with the most expensive solution - because expense usually means support. In this case QT is clearly the way to go, as everyone is pointing out (okay, wxWindows is another good choice, but I have no experience with this system).

      QT has an easier to program API, is quick to program in, has great documentation, has support, has a huge wealth of existing code examples, and is supported on Windows. GTK is not supported on Windows, and is a one-man port job. Fine for free software like the gimp, but not for a commercial application. Don't save a couple of grand on the GUI toolkit and get yourself a lot more costs in support that you have to provide because of problems.

      GTK2 might solve a lot of the problems in the current GTK of course, but I am not qualified to comment about that. And do you really want to program using a just finalised API?

      QT just does things right. 'nuff said.

    3. Re:Qt if you need Win32 by robberbarron · · Score: 3, Interesting

      Relying on a library that does UI emulation is a double-edged sword though. Since the emulation effectively replaces the native UI code, your app will lose all leverage from upgrades to the OS services. For example, an app that natively calls the Windows menu manager will automatically get the new windows XP look and feel for its menus. However, an app that uses a library that emulates the native OS will still have the old look and feel until the emulation library is upgraded. Since look-and-feel issues are the biggest gripes you will get from users when developing a cross platform library, this is not a decision that should be taken lightly.

      I've worked on two 1 million+ line sourcebases that were cross platform. One used a commercial porting library that was closed source but we had the source license for it. This was a losing proposition. If there was a bug, we could fix it in the library. However, that was a poor long-term solution because we were just patching the library rather than building a long-term cross platform infrastructure for our product.

      The second sourcebase I worked on used a home-grown UI abstraction. This one is a lot better because we have the ability to add or remove emulation as we wish. If we have an OS that doesn't support the services we need, we emulatate it. If the OS does support the services we need, we go directly to the OS and gain native look and feel with much less effort.

      For this reason, I recommend libraries that
      a) Provide a platform-neutral interface
      b) Implement the functionality by eventually calling the OS calls required to implement the functionality
      c) Is provided in source form so that you basically "own" the library. That way, any changes you make to the library improve your own long term situation.

      The only library I've seen that fits that requirement recently is wxWindows but I haven't used it for a real application so I can't comment on its suitability.

      Good luck

    4. Re:Qt if you need Win32 by Passacaglia · · Score: 1

      I've been doing a GUI for an app which was Motif, and I've been using GTK+, because it's under LGPL, unlike QT, which is GPL or pay. Last Friday, just to see, I ported the GUI to windows. Took fifteen minutes, and everything worked perfectly - even my xpm icons were rendered correctly, and the 3-button mouse functions. The widgets are drawn using GDK drawing functions, rather than using the widgets from the widget-set-with-no-name that is bolted to the windows kernel, so that the usability problems of that widget set don't appear in your app ( Like the scrollbar indicators which pop to their original position if the pointer momentarily goes out of the scrollbar trough).

      In short, portability is not a problem with GTK+, it's fast (on Linux and Windows), and version 1.2 is well-organized (don't know about v. 2)

    5. Re:Qt if you need Win32 by fault0 · · Score: 2

      However, your point is rather moot because TrollTech quickly updates Qt whenever there are new Windows versions. For example, with win2k, they updated Qt before win2k was out to have the new fading animations, etc..

    6. Re:Qt if you need Win32 by Anonymous Coward · · Score: 0

      > For example, an app that natively calls the Windows
      > menu manager will automatically get the new windows
      > XP look and feel for its menus. However, an app that
      > uses a library that emulates the native OS will still have
      > the old look and feel until the emulation library is
      > upgraded.

      Qt is maintained. Qt emulates the XP look and feel fine, and even supports XP themes.

    7. Re:Qt if you need Win32 by Anonymous Coward · · Score: 0

      Er, GTK+ is available for Win32. I know I didn't just imagine the GIMP install I did on the family's Win98SE box.

    8. Re:Qt if you need Win32 by fm6 · · Score: 2
      b) Implement the functionality by eventually calling the OS calls required to implement the functionality
      Early adopter of Java would argue with that. AWT originally relied on native controls for a lot of things -- and then broke when the controls turned out to have undocumented limitations and bugs.
  6. wxWindows (slightly OT) by Balinares · · Score: 5, Informative

    You may also want to take a look at the wxWindows toolkit. It's a wrapper over what's available on a given platform (the native API in Win32, GTK in the Unix world, and there's a Mac port in progress, I believe). Good stuff, definitely, especially if what you want is C++ and portability. Note that your apps will look totally windowsy on win32, so your users will not be confused by their look.

    --

    -- B.
    This sig does in fact not have the property it claims not to have.
    1. Re:wxWindows (slightly OT) by ghoti · · Score: 1

      wxWindows is really great. Not only does it contain a lot of useful stuff (and far beyond just UI things, also threads, sockets, etc), but they also have very good documentation. When I looked at GTK--, the documentation was totally unusable. There were lots of classes without a single word of documentation.

      --
      EagerEyes.org: Visualization and Visual Communication
    2. Re:wxWindows (slightly OT) by fault0 · · Score: 2

      > Note that your apps will look totally windowsy on win32, so your users will not be confused by their look.

      Which Qt does as well. I find wxWindows too MFC-y too use tho, although it is quite a viable alternative to Qt, especially for open software on Windows.

      However, If you want a high quality professional toolkit, stick with Qt. gtk--? no way, it's not in any good shape.

    3. Re:wxWindows (slightly OT) by Grab · · Score: 2

      Have you used FLTK or FOX as well? Any recommendations on the best out of those? I'm writing myself a front end to control the parallel port for some electronics stuff I'm doing, and I'm getting pissed off with being stuck in DOS. :-) A free toolkit to write a decent GUI interface would be ideal for me, especially if it was cross-platform.

      Since I can't afford the megabucks for a QT Windows license, I guess I'm stuck with GTK, wxWindows, FLTK or FOX. So which one to go for?

      Also, do any of these make it easy to do user-customisation of menus, toolbars etc, similar to current MS Office apps? Or docking windows?

      Grab.

    4. Re:wxWindows (slightly OT) by fault0 · · Score: 2

      It depends on if you want to release it.

      You can always use Qt non commercial on Windows for free without spending the megabucks.

      I've used FLTK, but it's a bit too light for my tasts.

      So, I think either wxWindows or Qt is your best bet.

      Qt does docking windows. Both Qt and wxWindows have good toolbar classes.

    5. Re:wxWindows (slightly OT) by Sludge · · Score: 5, Informative
      I second this, and find it not offtopic at all. wxWindows doesn't get anywhere near as much press as the other toolkits, but it's got fully fleshed out documentation available in a number of formats, active developers, four mailing lists of which I can attest the developer one getting 15-20 messages a day and ships with tons of code samples.

      The license it's under is acceptable (to me), and there are working large apps such as Audacity out there.

      When I discovered all of this, I decided to look into the technology side of things. To throw more goodness at you, let me say reiterate that the toolkit looks native to your environment which is a big win. On top of that, it lets you do things which aren't lowest common denominator and exist in only one or more environments, such as toolbar icons in Windows.

      I also like the class hierarchy. I had never done GUI programming before but everything came across rather clearly when I started reading the documentation.

      Additional to all the "low level" GUI junk, it also contains some routines for networks and a portable wxString class which is a lot like stl::string with more methods added. I found myself using this almost immediately and I haven't looked back.

      It's worth learning this stuff just to get away from MFC without taking the speed hit of learning Java/Swing and having to learn a whole new language and culture. There is even some boasting about how 'the Java honeymoon is over' on the page, stating that wxWindows is actually a more portable toolkit. :) ymmv.

      There are both Python and Perl bindings for it. I haven't looked into either really, but at least the Python ones seem to be of high quality as a number of people on the mailing list are Python programmers.

      Check it out before coming to a conclusion of what toolkit to use. It's worked for me.

    6. Re:wxWindows (slightly OT) by nihilogos · · Score: 2

      Good stuff, definitely, especially if what you want is C++ and portability.

      QT is excellent on both counts.

      --
      :wq
    7. Re:wxWindows (slightly OT) by mill · · Score: 5, Informative
      If it hasn't been mentioned yet

      Al Stevens took a look at both Qt and Gtk-- in the September and October issues of Dr Dobbs Journal.

      What he didn't like with Qt:

      • No namespaces
      • Language extensions to implement slots
      • An ill-organized and unnecessary RTTI mechanism
      • Custom rather than standard containers
      • Questionable C++ coding conventions

      The last (I think. I only have October) refers to that Qt takes ownership of objects instantiated on the heap i.e. new without a corresponding delete. Which means you have to do all instantiating on the heap because there is no portable way for Qt to know if it is on the stack, external, or static memory.

      He thinks Gtk-- remedy all these problems and he actually found the tutorial funny albeit a work in progress.

      /mill

    8. Re:wxWindows (slightly OT) by murrayc · · Score: 1

      A few months ago we made added a vast amount of reference documentation to gtkmm.

    9. Re:wxWindows (slightly OT) by Grab · · Score: 2

      Thanks man. I didn't notice on my last look at TrollTech's site that you could use Qt on Windows without spending the megabucks - I thought their Windows version was spend-the-money only. The non-commercial version of Qt should do the job nicely. Cheers.

      I guess the only downside is the "requires Visual Studio" gotcha. I've got v5, so I hope that works. If not, it may be wxWindows instead.

      Grab.

    10. Re:wxWindows (slightly OT) by Anonymous Coward · · Score: 0

      I've read the article: it seems Al Stevens doesn't know anything about hierarchical tree structures. Every other toolkit I know works just like Qt. Only Gtk-- is anomalous - I suspect because it's just a wrapper, so the tree structure of widgets gets confused.

  7. GTK and Qt... by Anonymous Coward · · Score: 0

    ... both suck! Motif forever!

  8. GTK Seems solid, but slow on Solaris by Dooferlad · · Score: 2, Informative

    ...but a little slow on Solaris 8. Maybe it is just me, but my build of Mozilla really jerkey on a workstation (UltraSPARK III, 2G RAM). On the other hand The Gimp runs like a dream on my Windows box, and Mozilla is zappy on Linux.

    --
    Dooferlad

    1. Re:GTK Seems solid, but slow on Solaris by chegosaurus · · Score: 1

      Have you got some shared memory available to GTK on Solaris? Rebuild it to use mit-shm, and with no debugging code.

      Gtk is equally quick on my Solaris/Linux/FreeBSD machines.

    2. Re:GTK Seems solid, but slow on Solaris by Ozx · · Score: 0

      Using Mozilla to benchmark GTK is perhaps a mistake... Try other applications, and if they're still biting the ol' wang, look at your X configuration...
      What framebuffer are you using, anyway?

    3. Re:GTK Seems solid, but slow on Solaris by dakoda · · Score: 1

      a while back, i decided to try my hand at both qt and gtk. unfortunatly, the only machine i had access to was an old 486sx33. after about a day, i gave up :^) . gtk was faster on (the ancient)x86, qt is horribly slow.

      another drawback it qt's really slow textmode, which is, as already stated, really slow.

      gtk's design is going crazy though. simplicity is definatly with qt.

    4. Re:GTK Seems solid, but slow on Solaris by Dooferlad · · Score: 1

      I will give that a go. Basically I ran ./configure and make it. Silly of me to assume that since it runs like a pig without the mit-shm option, it would build with it enabled by default!

    5. Re:GTK Seems solid, but slow on Solaris by SpinyNorman · · Score: 2

      I believe you can also configure mozilla to build using Xlib directly rather than GTK - but I've no idea if that makes it any faster. I've just switched to mozilla 0.9.6 from netscape 4.X as my main browser, and it is rather sluggish on both x68/linuz and SPARC/Solaris, but the tabs are a killer feature!

  9. licensing by Cardinal+Biggles · · Score: 5, Informative
    Overall functionality, momentum for future growth, ease of use, licensing, and pretty much anything else is relevant to our decision.

    To pick up your point on licensing, Qt is either GPL or pay. So if your application will also be GPL, it's free, if your application will not be GPL you will have to pay up for Qt. GTK is LGPL AFAIK (enough acronyms for you? ;-) so that will not stand in the way of making your app non-free.

    BTW, if you know C++ and want to get to know a bit about Qt, they have a pretty good tutorial online here. Just walking through the examples made me realize just how cool it is, and how much you can do in just a few lines of code.

    1. Re:licensing by Snowfox · · Score: 3, Informative
      Overall functionality, momentum for future growth, ease of use, licensing, and pretty much anything else is relevant to our decision.
      To pick up your point on licensing, Qt is either GPL or pay. So if your application will also be GPL, it's free, if your application will not be GPL you will have to pay up for Qt. GTK is LGPL AFAIK (enough acronyms for you? ;-) so that will not stand in the way of making your app non-free.

      Just remember that you only need to give your source to any entity you give the binary to. Being GPL/LGPL doesn't mean you can't use it for business use; the license is entirely transparent for apps which will only be used internally.

    2. Re:licensing by Thatman311 · · Score: 0

      But then if you are trying to sell it as a commerical application when you give them the source along with the app they can now tak that source and continue developement on it and you do not have any future revenue from them.

      --
      Silly Rabbit...Sig's are for kids.
    3. Re:licensing by Electrum · · Score: 1

      Just remember that you only need to give your source to any entity you give the binary to. Being GPL/LGPL doesn't mean you can't use it for business use; the license is entirely transparent for apps which will only be used internally.

      Actually, you cannot use the non commercial version of Qt for non free internal applications:

      "A non-commercial setting means that you must not use the package in the course of your employment or whilst engaged in activities that will be compensated. A non-commercial application is an application that cannot be sold, leased, rented or otherwise distributed for recompense."

      See their page for more details: http://www.trolltech.com/developer/download/qt-win -noncomm.html

      However, their prices are quite reasonable, when you consider what you get. Qt is an excellent toolkit, and in my opinion, better than anything else available. Native support for all three major platforms with only a recompile is great. The price for one enterprise license is probably less than a developer's salary for two weeks. How long would it take you to port your application from X11 to Windows or MacOS?

    4. Re:licensing by Snowfox · · Score: 2
      Actually, you cannot use the non commercial version of Qt for non free internal applications:

      Correct me if I'm wrong; I believe that Qt is dual-licensed. The TrollTech license is the one you quoted, but it's also under LGPL which doesn't permit the kind of restriciton you mention.

      So for internal proprietary use, you're 100% clear, so long as you're using the LGPL version, not a straight download from TrollTech.

  10. slashdot really needs... by bani · · Score: 0, Offtopic

    ... a "flamebait" or "troll" story category ...

    1. Re:slashdot really needs... by fredrik70 · · Score: 1

      now, I would definetly mod this one as funny actually...

      --
      if (!signature) { throw std::runtime_error("No sig!"); }
  11. Licencing by CH-BuG · · Score: 3, Insightful

    If you intend to develop a closed-source product, the licence of both library will probably need to be evaluated too. If you go for
    an open licence, then it's of minor importance.
    (Qt requires licencing fees if you want to keep
    your sources closed).

    1. Re:Licencing by zmooc · · Score: 2, Informative

      As far as I know/understand, QT is GPL and GTK is LGPL so you can't make a closed-source application based on QT unless you buy a license from Trolltech.

      --
      0x or or snor perron?!
    2. Re:Licencing by WzDD · · Score: 1

      No, that's incorrect. Qt is dual QPL/GPL. The QPL is basically "release your source", ie a much more permissive license than the GPL (because it means I can BSD-license my code)

  12. Cross platform? by Nicolas+MONNET · · Score: 1

    Are you going to develop two versions -- one for Windows using MFC and one for Linux using GTK or QT? -- or do you plan to use one library for both?

    Using GTK excludes the latter, as while it can be used on Windows, and thus makes it possible to port programs such as Gimp to this platform, it's not exactly its most supported feature. And it doesn't look like native Windows.

    On the other hand Qt is really supported on Windows -- actually, you have to pay for it.

  13. plattforms by omich · · Score: 1

    If MacOS-X might be a target platform for you, your choice should be QT.

  14. Qt has better documentation by tgreiner · · Score: 5, Interesting

    I have only scratched the surface of both GTK-- and QT, but I found QT to have a *very good* documentation. It has a complete class hierarchy documentation and comes with a load of example programs.

    Another observation is that GTK-- is much more low-level than QT. If you want to extend it's components you might have to delve into the depths of the gdk library (which, in my view is only a thin wrapper around the X11-libs). QT on the other hand has a very good abstraction of windowing system details. Being mostly a Java programmer, I found the QT model very easy to use.

    Of course, YMMV.

    1. Re:Qt has better documentation by Anonymous Coward · · Score: 0
      Another observation is that GTK-- is much more low-level than QT.
      Translation: GTK is far from done yet.

      Sorry, there's a difference between low level and incomplete. QT does everything GTK does and more. If A can do 2 things, and B can do those 2 things as well as 10 things incorporating those 2 things, A is not more "low-level" than B. A is less complete than B.

    2. Re:Qt has better documentation by fault0 · · Score: 2

      > QT on the other hand has a very good abstraction of windowing system details.

      Yup, this is because Qt is not a gui-toolkit but rather an application framework. It provides classes that work equally on all platforms that Qt supports, saving the user from writing a bunch of #ifdefs for particular platforms. It works really well :)

    3. Re:Qt has better documentation by murrayc · · Score: 1

      This is misleading. It is very easy to subclass gtkmm widgets to change their behaviour and contents. Very low level stuff is possible but rarely necessary.

    4. Re:Qt has better documentation by spitzak · · Score: 2
      QT's documentation is done by their other product doxygen (look for it with Google) which is really quite excellent for producing complete and accurate documentation. It works by reading comments added to the source code, but, unlike other systems, those comments are quite readable and easy to type, and don't have to be in the header files.

      We use it in-house and have been very happy with it.

      PS: it is not linked to Qt at all and can be used to document any C++ code.

  15. GTK+ C++ wrappers by HalfFlat · · Score: 5, Informative

    I worked on a rushed project earlier this year, and used the gtk-- C++ wrapper for GTK, as well as the gnome-- wrapper (then still very much under development) for the Gnome libraries, specifically the canvas.

    Personally, I found it frustrating to use. As these wrappers are still being worked on, the documentation is sketchy. The object-owning semantics are confusing (at least to me) - I was forever leaking memory or prematurely destroying objects. Trying to destroy something from within a menu callback I recall was particularly noisome. The gnome-- canvas wrappers were a moving target, though they may have since stabilised, and didn't fully expose the canvas API. Writing one's own canvas items is done in C, and then wrapped.

    Perhaps with more persistance I might have figured out how to set up keyboard acceleration, but it is at anyrate a real battle to find documentation that explains what is going on with it. AFAIK, there is no straightforward way of making a multiple file selection in GTK+ 1.2. In gnome canvas (not GTK+, but a close cousin) there is promised functionality that is simply not implemented - I'm thinking here of smoothed lines, for which the code reads:

    /* FIXME */

    I haven't used QT yet. It certainly looks pretty, and a quick glance at the example code and docs provided seems to indicate that it's not too complicated, and well documented. I'd certainly shy away from GTK+ if a C++ interface is required.

    The new version of GTK under development should address many of the shortcomings of the current toolkit, and includes goodies such as Pango. It is not yet in a stable state, however, with the API still undergoing final tweaking I believe.

    1. Re:GTK+ C++ wrappers by Anonymous Coward · · Score: 0

      Sadly, you are mostly correct about the documentation part of GTK. In fact that's the biggest problem I have with it. One of the common responses from people on the gtk app dev mailing list is to "keep a copy of the source handy" which isn't really what most people have in mind when they want docs for a toolkit. Sure, it's the ultimate reference but hardly the most user friendly one.

    2. Re:GTK+ C++ wrappers by ghoti · · Score: 1

      Try wxWindows. The documentation is great, and it works very well on top of GTK (and Windows native).

      --
      EagerEyes.org: Visualization and Visual Communication
  16. Why not wxWindows? by joerg · · Score: 1, Redundant
    Why don't you consider using wxWindows? It is a great portable toolkit for free (LGPL licensed).

    wxWindows has a very rich feature set for building GUIs, plus many other benefits like portable classes for threads, networking, ipc, file i/o, serialization and much more. It is available for almost any kind of UNIX-like OS, for any Windows version, and some more platforms like VMS.

    It is a shame that wxWindows doesn't yet get more attention.

  17. A third alternative... :) by jonathan_ingram · · Score: 3, Informative
    I'm a great fan of Qt, but I don't believe it's always the best toolkit to use for cross platform compatibility (although it is the best toolkit available for UNIX-based systems), plus there are complications about the licenses differing versions are available under. GTK-- and its competitors (Inti?) only have a very small user and documentation base, so they are probably not a good choice for a large commercial project.

    If you want cross platform compatibilty with C++, then check out wxWindows. It has ports to Windows, MacOS (9 & X), UNIX + Motif, UNIX + GTK. It also has a very well developed Python binding -- so well developed that quite a few people want it adopted as the official Python GUI instead of TKinter.

    1. Re:A third alternative... :) by fault0 · · Score: 2

      > good choice for a large commercial project.

      Nah, Qt itself is probably the best choice for a commercial project. I'd use wxWindows for free software that targets many platforms tho, and Qt for X11-only free software.

      > wxPython

      Yeah, wxPython's really nice.

  18. What about gimp? by bani · · Score: 2, Interesting

    Didn't they port gimp to win32?

    gimp is THE flagship gtk application, bar none.

    1. Re:What about gimp? by crawlie · · Score: 0

      xchat has also a win32 binary, and it uses gtk. Though, it isn't as stable as the *nix version, I think...

    2. Re:What about gimp? by Ami+Ganguli · · Score: 5, Informative

      It exists, but I don't think it's maintained as well. The primary developers don't really care about Win32, so maintaining it is left to a few masochists :-).

      --
      It is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail. - Abraham Maslow
    3. Re:What about gimp? by egghat · · Score: 2, Informative

      yeah and that's a big shame.

      GTK porting was mainly done by one single person.

      I think, there are a few other GTK based apps, which Windows Users would like. But without a stable GTK on Windows?

      Bye egghat.

      --
      -- "As a human being I claim the right to be widely inconsistent", John Peel
    4. Re:What about gimp? by FuegoFuerte · · Score: 3, Insightful

      I regularly use the GIMP on Windows, and at least for me, it's at least as stable as any of my other Windows programs. Remember one thing: if it crashes running under *nix, people will get mad. Things aren't supposed to crash under *nix. If it crashes under Windows, people will more than likely say "humbug", restart their computer, and go on with things.

  19. 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
    1. Re:Before the flame wars start... by jd10131 · · Score: 2, Interesting
      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.
      Of course. The OO features of C++ can be largely implemented in C, using structs and function pointers. Both ObjC and C++ are just C with some extra syntactic sugar...not that that is a bad thing. =)
    2. Re:Before the flame wars start... by Anonymous Coward · · Score: 0

      Oh really? Show me expression templates like in PETE or operator overloading like in Blitz++ for C. Yumm.

    3. Re:Before the flame wars start... by David+Greene · · Score: 1
      Actually, James is correct. Any compiler based on the Edison Design Group frontend can translate C++ into C code. EDG is considered the "son of cfront" by Bjarne. The compilers may not expose this capability but it is there.

      Note that I did not say "equivalent C." In the translation to C the compiler loses the chance to apply some very important transformations such as the empty-base-class optimization. Internally, of course, the EDG frontend keeps all the high-level C++ information so compilers can implement their own object model. It's only if the code is lowered to C code that it loses out.

      Templates, of course, are implemented via code duplication. It's really not rocket science, though those writing the parsers would disagree. :) In fact it is this duplication that makes expression templates and functor templates so fast.

      --

    4. Re:Before the flame wars start... by Anonymous Coward · · Score: 0
      There seems to be the implicit assertion in there that because a tool exists to convert C++ to C, then C provides most all the features of C++. But, if it is so impractical to expose those features to the point of requiring a serious amount of (pre)comiling, then I'd assert C does not contain those features.

      Consider a parallel argument: Most any C++ compiler can translate C++ code to assembly language, therefore assembly language provides expression templates and functor templates.

      We'd all scoff at that assertion. What makes C different than assembly under that argument?

    5. Re:Before the flame wars start... by David+Greene · · Score: 1
      Ah, you misunderstood me. I am absolutely not arguing that one should use C to write OO code. I think that's a ludicrous strategy, unless there are very, very good reasons to do so (unavailable compilers, etc.). You are correct that templates as such can't be written in C. One writes templates in C via cut-and-paste. :) My point is that templates are not magical. Sometimes the code looks like it, but it ain't.

      I was attempting to show that C++ really isn't the bloated monster that most people seem to think. It is because of ignorance that most people shy away from C++, relying on anecdotal evidence obtained either via hearsay or from programmers not versed in C++ who feel the need to use every new whiz-bang feature and idiom they learn. C++ is a big language and it takes years to master. But once there, one is amazed by its power and flexibility.

      --

    6. Re:Before the flame wars start... by Anonymous Coward · · Score: 0

      Not true at all. Templates were designed to get most of the power of the C preprocessor but with typesafety.

      Anything that can be done with templates can be done with the preprocessor. Not that its really a good idea, but you can do it...

    7. Re:Before the flame wars start... by David+Greene · · Score: 1
      Anything that can be done with templates can be done with the preprocessor.

      That is simply not so. The preprocessor can't do type checking. As Andrei Alexandrescu recently pointed out, the preprocessor cannot be used in general to create C++ typelists (the commas in template specifications confuse the preprocessor).

      --

  20. Portability to Win32 by kintel · · Score: 4, Redundant

    AFAIK, the Win32 port of GTK+ is more or less a one-man show, making GTK pretty unstable and lagging behind on Windows.
    In addition, Qt now has a Mac OS X port.

    Add this to the excellent commercial support from Trolltech.

    Design and language issues not taken into account.

  21. Mozilla (slightly OT too) by mvw · · Score: 5, Informative
    Another alternative is using Mozilla as IDE. This might sound a bit crazy right now, but I believe this idea will get more followers, if Mozilla gets more and more stable.

    An example is the Komodo IDE by ActiveState, which uses XUL.

    XUL is the next generation browser application platform. Simply speaking, the Mozilla team chose an approach very similiar to JAVA to come closer to a platform independent graphical user interface:

    • implement a set of base compenents on the most popular platforms (Win32, Mac, UNIX, ..), that render your JAVA specific widgets in terms of the native GUI.
    • implement your applications in your JAVA language
    • compile application
    • distribute JAVA binaries

    XUL goes one step farther, as there is no compilation step.

    The XUL application implementation language is a XML language that together with cascading style sheets and JavaScript glue will yield an application one starts in the browser by opening the .xul document.

    A possible advantage of XUL might become the relative ease of application development, change and distribution.

    Possible problems will be similiar to the ones known from JAVA. The qualitiy of XUL applications will stand and fall with the quality of the XUL implementation for a specific platform, which right now means the quality of its Mozilla or Netscape implementation.

    Of course, compared to JAVA, which has underwent several larger development cycles and now features mighty libraries, XUL is a bleeding edge technology at its beginnings.

    However it is still possible to make direct use of the various Mozilla widgets as well from C++.

    1. Re:Mozilla (slightly OT too) by Anonymous Coward · · Score: 0
      Another alternative is using Mozilla as IDE.

      And another alternative is replacing all your divides with loops that subtract a lot. They're both great ways to slow the hell out of your app. :)

      Sorry, but building an app with Mozilla as your interface library is like deciding to layer MFC on top of Visual Logo or something.

    2. Re:Mozilla (slightly OT too) by ajs · · Score: 3, Interesting

      1. Have you used anything built on top of Mozilla (e.g. Komodo) or are you just flaming because it feels good?
      2. If you actually needed a UI that was as rich and powerful as XUL can provide, why woulld you want to go off an write it al yourself?
      3. Are you thinking in terms of writing web pages and CGI that acts as an application, or are you thinking in terms of building your UI into the XUL interface of Mozilla? These are very different things (and both actually have a place in different applications).

    3. Re:Mozilla (slightly OT too) by ajs · · Score: 2

      I've played with Komodo, and I have to say that I'm impressed. XUL+Moizilla can certainly be turned to one's advantage. I imagine that the crucial point is where you put the dividing line between your app and the UI. I would think that you'd want to build only the highest level UI pieces in XUL, and then the rest of your app in a low level language.

    4. Re:Mozilla (slightly OT too) by be-fan · · Score: 1, Troll

      Great. We'll have more slow, bloated apps that don't look native. No compilation step? Who CARES! You only compile it once! You're users have to deal with your shit mistakes every time they use the damn program!

      --
      A deep unwavering belief is a sure sign you're missing something...
    5. Re:Mozilla (slightly OT too) by elflord · · Score: 1
      No compilation step? Who CARES! You only compile it once!

      Have you ever worked on real software ? Compile it once ? ROFL. (note: but I agree with your comments re: slow and bloated)

    6. Re:Mozilla (slightly OT too) by be-fan · · Score: 2

      You know what I meant. Besides, if you make proper programs that are nicely split up into multiple shared libraries (or you have a good compiler that does incremental compiles), then you only have to compile the interface portion when it changes.

      --
      A deep unwavering belief is a sure sign you're missing something...
  22. 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 GiMP · · Score: 1, Insightful

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

      So?

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

      Why?
      > QT comes with a very good interface builder.
      Use vim.

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

      > With Kdevelop you have access to a very good IDE.
      Use Vim.

      > 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.

      Gtk is more commonly used then any other brand. Sure it sucks, but it sucks less.

    2. 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:Some REAL points by fault0 · · Score: 2

      > Gtk is more commonly used then any other brand. Sure it sucks, but it sucks less.

      And gtk-- is barely used at all.

    4. Re:Some REAL points by bigtoy · · Score: 2, Insightful

      What does having Kdevelope have anything to do with Qt? Regardless of whether you use Qt or gtk based systems you can use Kdevelope. Looks like you are grasping a bit here.

      Why do I care that the widgets provide SQL? I may consider that bloatware and more that I want for my development needs.

      I know lots of professionals that go with products that are open source and not termed "professional" because they are not backed by a company. A good number of professionals use tools that they can modify and see the internals. (Both available for Qt and gtk, so no harm no foul.)

      Qt feels "snappier"? Puh-lease. Lets live in the land of the subjective here. You are obviously lost. Look into the role of the WM.

      BTW, I am not endorsing either product. Just playing the "Devil's Advocate". I hate to see biased, pointless, not clearly thought through arguments used to push someones view.

      --
      "A sample size of one is really just statistical masturbation."
    5. Re:Some REAL points by JimMcCusker · · Score: 3, Insightful

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

      >So?

      So QT is also well-written C++, which means it's much easier to write for. C++ wrappers over C libs almost always end up having to deal with Cisms that aren't an issue when using C++.

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

      >Why?

      Because if you want any company that is developing internal applications to use QT instead of VB, it had better have direct access to SQL databases, because about 90% of "enterprise" apps are souped-up database forms strung together in a meaningful manner.

      >> QT comes with a very good interface builder.

      >Use vim.

      And painters should write down specific instructions for a machine to render their paintings. I'm sorry, but being a UI designer, I'd say that most of us, when designing UIs, think visually, not textually. This isn't better or worse, just different. I use emacs and the command line whenever I'm developing backend code, but any time I need to develop a UI, I need to see it, and I'll be damned if I'm going to wait even 3 seconds for a program to compile and run if all I'm doing is checking if I got the constraints on some widget set right. It just interrupts the flow of work.

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

      > Opinionated

      Yes, but valid. The response time of a UI is crucial to user acceptance. Anything that takes longer than 1/10th of a second is not instant.

      >> With Kdevelop you have access to a very good IDE.

      > Use Vim.

      See above. Kdevelop also makes it easy to set up automake/autoconf build methods, even for people who aren't familiar with them.

      >> 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.

      I care. My time is valuable, and it takes me the same amount of time to write 100 lines of QT code as it does 100 lines of GTK code. If I can get more done with 100 lines of QT code, guess which I'm going to use? The best situation is where the library gives you access to powerful abstractions (like QT does), but then also gives you access to lower level details if you need it. There's nothing to slow you down like dealing with details that don't even matter.

    6. Re:Some REAL points by Anonymous Coward · · Score: 0

      KDevelop... a good ide? Ehh (laughing)

    7. Re:Some REAL points by elflord · · Score: 1

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

      Among other things, it means that Qt has some useful documentation, while the C++ wrappers for GTK seem to have "second class" status. (source code is not documentation)

      Use vim

      Vim is not an IDE or a UI builder. It's a great text editor.

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

      "Hard to use" is not the same as "more options/power". Of course, the options/power aren't much good anyway if they're not adequately documented.

    8. Re:Some REAL points by Anonymous Coward · · Score: 0

      >So QT is also well-written C++, which means it's much easier to write for. C++ wrappers over C libs almost always end up having to deal with Cisms that aren't an issue when using C++.

      Name one.

      >Yes, but valid. The response time of a UI is crucial to user acceptance. Anything that takes longer than 1/10th of a second is not instant.

      Just as many people have the exact oposite opinion, QT is a piece of trash on MY system, while Gtk runs really snappy.

      >See above. Kdevelop also makes it easy to set up automake/autoconf build methods, even for people who aren't familiar with them.

      Anjuta DevTools is easily as featureful as nice as KDevelop. http://anjuta.sourceforge.net/ Glade is a terrific GUI builder.

    9. Re:Some REAL points by 21mhz · · Score: 0, Flamebait

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

      And the end result is different because..?

      > 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.

      If I understand correct, the other poster talks about database access from visible GUI elements. This is insane, by my book. Having an embeddable database viewer component is probably a good thing, but bolting it into library widgets is perpetrating unnecessary bloat. An object-oriented database layer can be helpful though, for you weaklings, hehe.

      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.

      Sorry, but you're a fucking troll.
      --
      My exception safety is -fno-exceptions.
    10. Re:Some REAL points by 21mhz · · Score: 1

      So QT is also well-written C++, which means it's much easier to write for. C++ wrappers over C libs almost always end up having to deal with Cisms that aren't an issue when using C++.

      Bzzzt. Look at the GTK-- headers, then try again.

      --
      My exception safety is -fno-exceptions.
    11. Re:Some REAL points by fault0 · · Score: 2

      > Name one.

      Uhm, gtk--?

      > Just as many people have the exact oposite opinion, QT is a piece of trash on MY system, while Gtk runs really snappy.

      Both run pretty snappy here. People who say "GTK is faster than Qt" and "Qt is faster than GTK" are pretty much trolls. Both are about the same speed.

      > Anjuta DevTools is easily as featureful as nice as KDevelop. http://anjuta.sourceforge.net/ Glade is a terrific GUI builder.

      Anjunta's cvs version isn't as advanced as KDevelop's cvs version. Although Anjunta's cvs version seems to be less broken at this time than KDevelop's (I've tried both within the last month).

      You might want to try Qt Designer as well. It's the Qt equivalent of Glade, but has a pretty nice code editor in version 3 :).

    12. Re:Some REAL points by Anonymous Coward · · Score: 0

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

      How does shit like this get modded up? The problem here is that slashdot is populated by 15 year old 1337 wannabes, whose only real experience with Linux is running KDE.

      GTK WAS DESIGNED AS AN OO TOOLKIT. It may not have all the syntactic sugar that C++ has, but it's not less OO. Qt is so well designed it uses a fucking pre-processor to generate ugly, spaghetti C++!

    13. Re:Some REAL points by Jeremy+Erwin · · Score: 2

      QT is C++ from the ground up, GTK-- is wrapping GTK++. Correct me if I'm wrong, but neither "signal:" not "slot" are C++ constructs. You still have to use the moc utility to translate your code into standard "C++". QT is C++ only to the extent that "Objective C++" can be considered C++.

    14. Re:Some REAL points by Wavicle · · Score: 2
      Why do I care that the widgets provide SQL? I may consider that bloatware and more that I want for my development needs.

      You may not care. Many application developers in the world need both rapid development and database access. This feature is something they would care for very much. Yours is a poorly thought through argument.

      Qt feels "snappier"? Puh-lease. Lets live in the land of the subjective here.

      He was being subjective, so are you.

      You are obviously lost. Look into the role of the WM.

      If the same functionality under the same WM has a feel of faster feedback with a Qt application than with a GTK-- application, that kind of eliminates the role of the WM, doesn't it?

      --
      Education is a better safeguard of liberty than a standing army.
      Edward Everett (1794 - 1865)
    15. Re:Some REAL points by Wavicle · · Score: 2
      If I understand correct, the other poster talks about database access from visible GUI elements. This is insane, by my book. Having an embeddable database viewer component is probably a good thing, but bolting it into library widgets is perpetrating unnecessary bloat.

      The original poster was slightly mistaken. Qt 3.0 has a few SQL enabled widgets in its new SQL module library. see trolltech.

      An object-oriented database layer can be helpful though, for you weaklings, hehe.

      [...]

      Sorry, but you're a fucking troll.

      hmmmmm....

      --
      Education is a better safeguard of liberty than a standing army.
      Edward Everett (1794 - 1865)
    16. Re:Some REAL points by elflord · · Score: 1
      Name one.

      I consider the lack of a memory management policy to be a "Cism". In Qt, Widgets manage their parents. In GTK--, sometimes they do and sometimes they don't (talk about confusing, error prone and annoying!)

      QT is a piece of trash on MY system, while Gtk runs really snappy.

      First, the performance of GTK+ is peripheral, because we're discussing GTK--. Second, unless you have benchmarked it, you're just blowing smoke.

      [snip: glade]

      I've used that. Yes, it's pretty cool.

    17. Re:Some REAL points by GiMP · · Score: 1, Troll

      > See above. Kdevelop also makes it easy to set up
      > automake/autoconf build methods, even for people
      > who aren't familiar with them.

      Those people have no business doing software development.

      I also reckon that you believe WYSIWYG "html editors" have a place? Maybe for my 10 year old female cousin, but not for anyone else. Yet again, they shouldn't play the game if they are afraid of the ball.

      SQL is a backend issue, there are no reasons for it to be tied into a toolkit.. if so, it is the worst form of bloat.

      The other major issue with QT is the terrible licensing. It still sucks, and I doubt it will ever not suck. I would never base my software on something that will make it as valuable as a pile of rubbish one day.
      Oh, and btw.. Not everyone wants to write in C++. And true, not everyone wants to write in C.. but Gtk is the most portable option overall. Sure, QT has ports.. but they aren't free. Gtk runs on many platforms and can be freely extended to others..

      Ok, so the Windows port of GTK is buggy.. so you develop an application for it, you make some fixes.. and you compile it statically and use a Windows-like theme.

      IDE.. hah, I'd like to see you use Kdevelop on a text terminal. Have a nickle, get yourself a real computer.

    18. Re:Some REAL points by GiMP · · Score: 1

      > Vim is not an IDE or a UI builder. It's a great text editor.

      Yes, I know. IDEs are useless piles of bloat and should rot in hell with Emacs.
      BASH, Vim, and gcc, make, and the gnu-utils are all one really needs for a development environment. Anything else is just bloat. I do agree that the auto-tools are quite nice, and are a perfect compliment to a development environment.

      However, anything that tries to make it possible for the non-coder to become a "h4x0r", writing their little AOL-"proggies" is just lame.

      Have a nickle, get yourself a real computer.

      Don't worry, I already checked the "no score +1 bonus".

    19. Re:Some REAL points by Shadowlore · · Score: 1

      If the same functionality under the same WM has a feel of faster feedback with a Qt application than with a GTK-- application, that kind of eliminates the role of the WM, doesn't it?


      Not Necessarily. If the WM uses SM, and one app is made with a toolkit that doesn't participate in SM, whilst another is made to use the SM routines, one will tend to load faster than the other. Which one is left as an exercise to the reader.

      Furthermore, if a WM loads, say, the GTK libraries or daemons/widgets/services (perhaps it uses them), and you load a GTK app, then load a Qt app, for example, one will certainly load faster, and that will be an effect of the chosen WM. The situation could easily be reversed, so, yes the WM can be a determining factor.

      Additionally, how an app's toolkit is tied into the WM would have an effect, which would make the "snappiness" change with respects to the WM currently in use.

      --
      My Suburban burns less gasoline than your Prius.
    20. Re:Some REAL points by murrayc · · Score: 1

      A GUI toolkit, like any library, should allow its objects to be created on the stack or on the heap. QT does not. I don't see that as a feature.

    21. Re:Some REAL points by elflord · · Score: 2
      A GUI toolkit, like any library, should allow its objects to be created on the stack or on the heap.

      Why ? What are the benefits of allowing this ? Having Qt widgets created on the stack simply does not make any sense, because an object created on the stack is destroyed when it goes out of scope. This is not sensible behaviour for a GUI program.

      In the few cases where it does make sense (eg temporary dialogs), you can create the object on the stack (because the dialog is unparented)

      QT does not. I don't see that as a feature.

      Name just one concrete disadvantage of this. And explain why the disadvantage outweighs the benefits of having a consistent memory management policy (so you don't have to remember which widggets are managed and which aren't)

    22. Re:Some REAL points by elflord · · Score: 1
      Yes, I know. IDEs are useless piles of bloat and should rot in hell with Emacs.

      A lot of people use IDEs to get real work done. That you don't find them useful is of peripheral relevance.

      BASH, Vim, and gcc, make, and the gnu-utils are all one really needs for a development environment. Anything else is just bloat. I do agree that the auto-tools are quite nice

      If you're doing any serious development, autoconf and libtoool are necessities.

      However, anything that tries to make it possible for the non-coder to become a "h4x0r", writing their little AOL-"proggies" is just lame

      AOL kiddies don't use C++. Sorry, any chimp can run g++ from the command line. An IDE like KDevelop is useful for building larger projects targetted to multiple with several files.

      Have a nickle, get yourself a real computer.

      Or maybe you should, if that poor little box of yours can't even run emacs! My dual athlons are doing just fine thanks. Works wonders for parallel builds.

    23. Re:Some REAL points by elflord · · Score: 1
      I also reckon that you believe WYSIWYG "html editors" have a place?

      There very handy for editing tables. Editing tables doesn't really lend itself to hand-coding.

      SQL is a backend issue, there are no reasons for it to be tied into a toolkit.. if so, it is the worst form of bloat.

      You are one ignorant putz. Qt is not just a "GUI toolkit". THink of it as analogous to the java standard library, and you're closer to the mark. There's no rule that says Qt doesn't handle "back end" issues.

      IDE.IDE.. hah, I'd like to see you use Kdevelop on a text terminal.

      I'd like to see you run a GTK app on a text terminal. What's your point ?

    24. Re:Some REAL points by Anonymous Coward · · Score: 0

      Oh tables are SOO hard:

      <table>
      <tr>
      <td>
      First column, first row.
      </td>
      <td>
      2nd column, 1st row
      </td>
      </tr>

      <tr>
      <td colspan=2>
      Columns 1 and 2, 2nd row.
      </td>
      </tr>
      </table>Oh, i'm afraid of the simplicity.

      Get a live, like I said.. if you are afraid of the ball, you have no business playing the game.

    25. Re:Some REAL points by Anonymous Coward · · Score: 0

      You fail to understand the difference between "can not" and "do not want to". Any bonehead can learn html. I am not saying html is hard. However, you're going to have a hard time fine tuning your layout with hand coded html. If you want to type in raw html to prove how smart you are, good for you. I have a PhD in math, and develop C++ software, and have no interest in writing html tables the hard way to prove to myself that I am proficient with markup languages (which I've been using since I was in elementary school, btw)

    26. Re:Some REAL points by Anonymous Coward · · Score: 0

      C++ allows classes to be instantiated either on the stack or on the heap. The fact that Qt only allows heap variables makes it LESS 'C++' if anything.

      non-heap widgets makes it easier to create a Window subclass for each top level window, and have all its basic widgets simply be data members.

    27. Re:Some REAL points by murrayc · · Score: 1

      1. Choice is a good thing. People want normal C++ syntax and semantics so we give it to them. This allows code that uses 2 libraries to use a consistent memory management model with the classes from both.
      2. Unusual memory management should be easy to recognise. In gtkmm 1.2 widgets whose memory is managed by the container must be explicitly manage()d, and in gtkmm2 widgets which must be managed by the runtime system are accessible via reference-counting smart pointers.
      3. On the contrary, it makes perfect sense for a button to be deleted when its parent window is deleted. QT deletes it at the same time as gtkmm, but makes life difficult by forcing you to use a pointer and new() instead of a member instance.

    28. Re:Some REAL points by mill · · Score: 1

      You aren't supposed to fine tune your layout at all in HTML. If you have been using markup languages since elementary school it is sad that you haven't even understood the basics of HTML.

      /mill

  23. Mozilla? by dannyspanner · · Score: 3, Insightful

    I'm not trying to sound stupid or off-topic here, but have you considered Mozilla? Beyond ther browser, they've developed a really interesting cross-platform C++ (and JavaScript) development platform. For a start there's a cross platform implementation of COM and you can develop your UI's in an XML dialect called XUL.

    1. Re:Mozilla? by Grab · · Score: 2

      When running Mozilla on my old P233, I could literally see the space for a menu blocked out, then the lines of text for menu options drawn to the screen one after the other. The only other time I've experienced anything with a user interface this slow is when I'm running X applications on servers in the States from our offices in the UK. Mozilla is simply unacceptably slow.

      Grab.

  24. What about wxWindows? by SerpentMage · · Score: 0, Redundant

    Ever tried wxWindows? I and my company use it. IT IS REALLY nice and easy to use. And it is open source. Best of all it does "little" things like printing...

    --

    "You can't make a race horse of a pig"
    "No," said Samuel, "but you can make very fast pig"
  25. New GTK+ by JanneM · · Score: 4, Informative

    Don't forget that an all-new GTK+ version is just coming out, a cleaner design, vastly improved i18n support, and all. I suggest you look at GTK2 (and it's C++ wrappers) as well, as this is what's going to be used, rather than the current version.

    /Janne

    --
    Trust the Computer. The Computer is your friend.
    1. Re:New GTK+ by vrmlknight · · Score: 1

      GTK2 is comming out for *nix it will be a long while before its out on win32 or OS X

      --
      This must be Thursday, I never could get the hang of Thursdays.
    2. Re:New GTK+ by Tepic++ · · Score: 1

      There is already a working GTK2 port to win32. I've got the libraries and used an application based on it (of course this includes, glib, pango, etc.)

      Look for a Win32 Radeon tweaker on sourceforge and its got links (at least the install programs has) to the precompiled Win32 dlls for a prerelease GTK2.

    3. Re:New GTK+ by elflord · · Score: 2, Insightful
      Don't forget that an all-new GTK+ version is just coming out, a cleaner design,

      If they're redesigning the toolkit with every major release, that's a bad sign. Qt has not changed substantially since 1.x, the main difference is that functionality has been added to a rock solid infrastructure.

      BTW, when is the GTK documentation going to be available ? IMO if there isn't any documentation, it doesn't even deserve to be called "1.0".

    4. Re:New GTK+ by Misagon · · Score: 1
      BTW, when is the GTK documentation going to be available ? IMO if there isn't any documentation, it doesn't even deserve to be called "1.0".
      Gtk+ 1.2.x comes with a good overview, but lacks a reference. The reference can be found in the development series though. It's a pity they have not back-ported it the stable series.
      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
  26. Well.. by DGolden · · Score: 2, Insightful

    Geez. Talk about flamebait topic. Personally (and personal opinion only, here), I'd say, Qt is better designed, clearer, and easier from a programming standpoint - but it's actually not clean C++, what with its dodgy signals/slots stuff, that gtk-- manages to do within the bounds of the language.

    If you're writing commercial, proprietary software, then you have to pay to use Qt - but Trolltech provide a thoroughly professionally supported toolkit to you for your money.

    The Qt class library is actually more akin to the standard set of Java classes than just a widget set - there's decent cross-platform support for sockets, xml, threads, unicode, etc. It really makes C++ programming very easy.

    OF course, there's other cross-platform C++ tollkits like FLTK... The gui toolkit page lists many more.

    --
    Choice of masters is not freedom.
    1. Re:Well.. by Anonymous Coward · · Score: 0

      Don't touch FLTK yet!

      It is like Motif, only has basic gui primitives
      (i.e. labels, boxes, windows, lists and menus.)

      In a business application, you need alot of prewriten widgets, alot of specialized dialogs, etc.

      Also, FLTK in win32, launches a DOS box with every
      application. It is annoying.

    2. Re:Well.. by MSBob · · Score: 2
      Also, FLTK in win32, launches a DOS box with every

      That's purely a command line switch to the compiler. You can compile FLTK so that it doesn't do that. But I agree with you about the sparse widget set aspect of it.

      --
      Your pizza just the way you ought to have it.
    3. Re:Well.. by joss · · Score: 2

      Agreed - the widget set is not huge. Then again, I've never encountered another toolkit where writing your own low level widgets was as easy.

      QT comes 2nd IMNSHO. Better widget set, but not as fast or flexible.

      As for the DOS window - do shut up, your ignorance is showing. Compile the 50 or so
      example programs that come with fltk in release mode and observe the lack of any dos windows. For those too slow to type "fltk dos window" into google:

      > For MSVC++ the switch to the linker is:
      >
      > /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup

      --
      http://rareformnewmedia.com/
    4. Re:Well.. by Anonymous Coward · · Score: 0

      Too lazy to create an account right now, I'm off out in a minute :-)

      The signals/slots of qt doesn't personally bother me. So what if it's an extension to the language: through time immemorial people have extended languages to make them more effective for current applications.

      Qt seems very good if either you're a fre software programmer or you're a company who can afford the licence ($1500?) There is also FOX, http://www.fox-toolkit.org, which is still under development as yet but could soon become a really good library. I found it a bit lacking in its image-manipulation support but for many other apps it's well worth checking out.

      Nick

    5. Re:Well.. by Anonymous Coward · · Score: 0

      Yes, but, these days, you can do sigs/slots within the bounds of the C++ language (with templates) - gtk-- does this, for example. So, moc is feeling increasingly kludgy...

  27. Sorry. by buzzbomb · · Score: 0, Offtopic

    I wanted to take Friday off too, but the boss said I couldn't.

    Guess you'll have to do your own homework.

  28. If internationalisation matters... by tempfile · · Score: 3, Insightful

    ...go for Qt. Gtk, IMO, has the huge disadvantage that the current 1.2 revision doesn't support Unicode, whereas Qt fully relies on it and even provides GUI-independent helper classes for all kinds of Unicode conversion that you can use anywhere in the program. This would also help for the mathematical symbols that you probably want to display. It looks like Gtk2 will use Unicode and Pango, thus potentially blowing away the competition, but as long as there's no stable version of Gtk2, I'd go for Qt.

    1. Re:If internationalisation matters... by fault0 · · Score: 2

      > It looks like Gtk2 will use Unicode and Pango, thus potentially blowing away the competition, but as long as there's no stable version of Gtk2.

      However, Gtk2's win32 port will likely remain a very unsupported port. While qt's win32 port is as important if not more important (because of commercial licenses), than their X11 port.

  29. I switched from Gtk-- to Qt by Per+Abrahamsen · · Score: 3, Insightful

    From a conceptual point of view, I like Gtk-- better. It actually uses the modern C++ language, including the C++ type system. This way you avoid the need for a preprocessor, and get static typechecking instead of "dynamic typechecking" (i.e. "the user does the checking"), which is the entire point of using C++ in the first place. It also use the standard C++ library instead of duplicating it poorly, so you don't have to deal with multiple string types and the like. Since the application is a GUI frontend to a library written in standard C++, using the standard C++ library classes, this matter a lot. Qt is written for an ancient subset of C++, something closer to "C with Classes" than the C++ standard.

    However, Qt is simple to use, well documented, and have stable API's. In practice, these make it much easier to use than Gtk--.

    As an extra plus, Qt is GPL and therefore more gnulitically correct than Gtk--, which is only LGPL.

    1. Re:I switched from Gtk-- to Qt by Dr.+Evil · · Score: 3, Informative

      As an extra plus, Qt is GPL and therefore more gnulitically correct than Gtk--, which is only LGPL.

      The LGPL was written specifically to get around the 'viral' aspects of the GPL. Meaning that while Gtk-- gives you the option to GPL your product, QT does not. With QT you MUST use the GPL... unless you pay Troll Tech an arbitrary, although currently quite reasonable sum.

    2. Re:I switched from Gtk-- to Qt by elflord · · Score: 1
      It actually uses the modern C++ language, including the C++ type system. This way you avoid the need for a preprocessor, and get static typechecking instead of "dynamic typechecking" (i.e. "the user does the checking"), which is the entire point of using C++ in the first place.

      Dynamic typing happens to be very useful when developing GUI components. It tends to weaken coupling between different components and create less dependencies. It makes it easier to do things like run time loading of components. As for the preprocessor, I don't see why it's a "bad thing".

      It also use the standard C++ library instead of duplicating it poorly,

      They don't "duplicate it", and they don't "do it poorly". The Qt collection classes are pointer based, which makes sense for Qt. Usually, pointer based containers are problematic, because of obvious memory management issues. In Qt, parent widgets own child widgets, so the container doesn't need to own its pointers. As for "poorly", the Qt collection classes do a much better job than STL of avoiding the "template bloat" problem (they do this by using for the most part pointer containers based on the void* implementation)

    3. Re:I switched from Gtk-- to Qt by Anonymous Coward · · Score: 0
      With QT you MUST use the GPL... unless you pay Troll Tech an arbitrary, although currently quite reasonable sum.

      Not true. You can license Qt under the QPL.

    4. Re:I switched from Gtk-- to Qt by Otter · · Score: 1
      The LGPL was written specifically to get around the 'viral' aspects of the GPL.

      Right, but Per Abrahemsen is still correct. The FSF views the "Lesser" LGPL as a necessary evil, but the GPL is still more "Free" even in the case of libraries.

      Meaning that while Gtk-- gives you the option to GPL your product, QT does not.

      Come on -- does that sound like something Stallman would actually like? ;-) He was convinced that GNU would never go anywhere without LGPL'd system libraries, but you can't imagine that makes him happy?

    5. Re:I switched from Gtk-- to Qt by Dr.+Evil · · Score: 2

      I'm not saying that Stallman wouldn't like it. But isn't it ironic that the GPL is being used as a tool to create a market for the commercial version of the toolkit?

      As an end-user however, QT is superior. I've tried to learn Gtk--, but I couldn't wrap my head around the lack of documentation and the obtuse artifacts left over from the C origins of Gtk+.

      I hope they clean it up. The next time I delve into it, I will be trying to document-as-I-go.

      If somebody can understand how to create a reliable and quick UI in pure C, that's good for them. I can't touch it until it is wrapped in C++, and I am not skilled enough to do it myself. I really think you need somebody who eats, sleeps, dreams and breathes both Gtk and C++ to be able to write an effective wrapper.

    6. Re:I switched from Gtk-- to Qt by WzDD · · Score: 1

      With QT you MUST use the GPL... unless you pay Troll Tech an arbitrary, although currently quite reasonable sum.

      No, that's incorrect. Qt is dual licensed under the QPL and the GPL, meaning that all you need to do is open your source code and use the QPL licensed version.

    7. Re:I switched from Gtk-- to Qt by David+Greene · · Score: 1
      As for the preprocessor, I don't see why it's a "bad thing".

      It's a bad thing because the compiler doesn't see it. Debug symbols can't be generated, macros can't be called from within the debugger, constants are only visible as raw numbers, etc. Of course, moc doesn't have all of these problems but it does do a significant amount of translation not visibile to the compiler.

      That said, moc was a fine solution to the C++ compiler problem back in its day. At this point, most compilers can handle the template code necessary to implement signals and slots within the language. An advanced signals and slots library is being developed for Boost, a collection of peer-reviewed C++ libraries. Some have already been submitted for inclusion in the standard committee's library technical report (i.e. to be considered for the nex rev. of the standard).

      They don't "duplicate it"

      Well, they do parts of it. std::string is a fine string class. Actually, probably a little too featureful. As for containers, one can have containers of pointers in the std C++ library provided they are wrapped in smart pointers like Boost's shared_ptr.

      As for "poorly", the Qt collection classes do a much better job than STL of avoiding the "template bloat" problem (they do this by using for the most part pointer containers based on the void* implementation)

      The "template bloat problem" should really be called the "template implementation problem." It's only because most std C++ library implementations follow the original SGI offering that we have bloat problems. Andrei Alexandrescu (of Modern C++ Design fame) annouced some time back that he is working to build an ultra-efficient STL based on void * implementations where appropriate. I'm not sure what the status on that is, as he is getting heavily involed with Boost. Note that sometimes one wants template bloat because that's where expression templates and functor templates get their efficiency (because they are inlined).

      --

    8. Re:I switched from Gtk-- to Qt by elflord · · Score: 2
      Of course, moc doesn't have all of these problems but it does do a significant amount of translation not visibile to the compiler.

      I don't see how this is a problem in practice. I've made heavy use of Qt, and generated code hasn't made life any more difficult or confusing.

      That said, moc was a fine solution to the C++ compiler problem back in its day. At this point, most compilers can handle the template code necessary to implement signals and slots within the language.

      But why templates ? I suppose they might make people with a strong aversion to preprocessors feel better. There are a lot of potential pitfalls with templates (static typing, tight coupling, etc), so I'm sceptical.

      Well, they do parts of it. std::string is a fine string class.

      But most compilers don't ship a unicode version.

      As for containers, one can have containers of pointers in the std C++ library provided they are wrapped in smart pointers like Boost's shared_ptr.

      Reference counting is a terrible choice of memory management policy for GUI programming. The problem is that you are likely to get a lot of reference cycles in GUI programming (child widgets that know their parents being the obvious one, though there are less obvious ones also). Simply put, you don't want to have everything that knows a widget to have partial ownership, because for each widget, there is a natural owner -- the parent widget. The policy Qt uses, where parent widgets manage their children is much smarter. Keep in mind the kinds of problems Qt is trying to solve. For what it's trying to do, a reference count based memory management strategy isn't very effective.

      The "template bloat problem" should really be called the "template implementation problem." It's only because most std C++ library implementations follow the original SGI offering that we have bloat problems.

      Yes and no. Template bloat is a fundamental problem with templates. You're right that the std library could be implemented better than SGI's version. Metrowerks already ship a std library that uses void* for pointers, only creates one instance of the tree balancing code in the map/set implementations.

    9. Re:I switched from Gtk-- to Qt by David+Greene · · Score: 1
      Of course, moc doesn't have all of these problems but it does do a significant amount of translation not visibile to the compiler.

      I don't see how this is a problem in practice. I've made heavy use of Qt, and generated code hasn't made life any more difficult or confusing.

      No, you are right. There aren't many debugger problems I can think of that one would encounter with moc. But then I haven't used it heavily so I'm not the best person to ask. What about invoking a signal from the debugger? I was answering the question "in the large" about why, in general, preprocessors are a bad idea. Sometimes you need them, though.

      At this point, most compilers can handle the template code necessary to implement signals and slots within the language.

      But why templates ? I suppose they might make people with a strong aversion to preprocessors feel better. There are a lot of potential pitfalls with templates (static typing, tight coupling, etc), so I'm sceptical.

      Again, using the preprocessor to generate code is really not a great idea. I can't tell you how many times I've cursed software developers who implement C functions as macros so they don't have to cut-and-paste, changing types along the way. This is one of the problems templates solve.

      Templates are useful in C++ precisely because it is a statically typed language. I always cringe a little bit when I see code that casts away the compiler's good sense. There are of course cases where it is useful if used in a disciplined manner (void * implementations, for example). If one needs dynamic typing, use a more dynamic language.

      I haven't personally found coupling to be a problem. Templates are less tightly bound than non-template code because they don't care anything about class heirarchies. Rather than conforming to type interfaces, template parameters need only conform to syntactic interfaces.

      It's true that template code can sometimes result in an "explosion of templates" as one tries to fit a generic component into an existing framework. I have found that it is better to design for genericity at the outset. Templates usually result in better designs for me because I have to think about interfaces, concepts and genericity.

      Templates aren't good for everything. I don't think widget classes should be templatized. But signals and slots are components of widgets, not the widgets themselves.

      Well, they do parts of it. std::string is a fine string class.

      But most compilers don't ship a unicode version.

      Excellent point. I think a better solution would have been a TrollTech unicode traits class for std::string. There's much less code to write and the class automatically works with std libraries. Plus most programmers are already familiar with the interface. At the time, of course, TT didn't have this option.

      As for containers, one can have containers of pointers in the std C++ library provided they are wrapped in smart pointers like Boost's shared_ptr.

      Reference counting is a terrible choice of memory management policy for GUI programming

      There are several garbage collectors available for C++. I was just providing a starting place. The fexibility of std allocators is very nice.

      The policy Qt uses, where parent widgets manage their children is much smarter.

      I found it confusing, but you are right that when there is a definite concept of ownership, reference counting may not work. One can imagine a smart pointer that enforces ownership. std::auto_ptr does that, though it was really only designed to solve a very specific problem and shouldn't be used as a general owned_ptr. Boost's scoped_ptr may be what you're looking for.

      The "template bloat problem" should really be called the "template implementation problem." It's only because most std C++ library implementations follow the original SGI offering that we have bloat problems.

      Yes and no. Template bloat is a fundamental problem with templates.

      I don't see it as a problem at all. Templates prevent the cut-and-paste code one often sees with C. When designed sensibly to factor out common code (via void * or otherwise), templates present an extremely powerful framework providing flexibility without sacrificing type safety or efficiency. It's a classic size vs. speed/development time tradeoff.

      Perhaps much of the bloat results from vendors shipping products compiled in debug mode. Compiler transformations have an enormous impact on the size and speed of template code.

      --

    10. Re:I switched from Gtk-- to Qt by elflord · · Score: 1
      What about invoking a signal from the debugger?

      One can use the emit method. The SIGNAL and SLOT macros are pretty straightforward (wrap in quotes and prepend 2 and 1 resp.)

      Again, using the preprocessor to generate code is really not a great idea.

      They're using a preprocessor. This difference is important, in that it doesn't cause the problems that macros cause.

      If one needs dynamic typing, use a more dynamic language.

      It's not clearly advantageous to do so. Having an object system that supports dynamic typing is a very different thing to having a program where all objects "look the same".

      I haven't personally found coupling to be a problem. Templates are less tightly bound than non-template code because they don't care anything about class heirarchies.

      It's a problem because (for example) changing the implementation of a template class typically requires a recompile of all the client code (because you include the class definition, not just the declaration).

      There are several garbage collectors available for C++. I was just providing a starting place. The fexibility of std allocators is very nice.

      GC is a choice worthy of consideration for an object model designed to facilitate "rapid development". I suppose Troll's reason to stick with a heirarchical ownership system is that it makes sense for a GUI.

      I don't see it as a problem at all. Templates prevent the cut-and-paste code one often sees with C.

      I certainly agree that templates are useful. I have written code that makes heavy use of templates.

      Anyway, I've enjoyed this discussion. I don't often have intelligent conversations on slashdot. Cheers,

  30. FOX Toolkit by Phantasiere · · Score: 1

    Have you looked into the FOX Toolkit? It's written in C++, is available on many UNIX and Windows platforms and has many bindings to other languages (Ruby, Python, Eiffel). You can find it here.

    1. Re:FOX Toolkit by Anonymous Coward · · Score: 0

      Really impressive are the screenshots of little red X's.

  31. QT forces non standard c++ use by Charley's+Angel · · Score: 2, Interesting

    The big difference is that gtk-- is based on the C++ standard library, and so allows you do use familiar and efficient constructs like std::vector, std::string and so on.

    QT has reimplemented all those things as a rather dodgy set of proprietry classes, which lock you into, for example using QString rather than std::string throughout your application, or doing a lot of extraneous conversions every time you need to talk to the GUI.

    In its favour, QT does have much better documentation than gtk--, but all the same, I prefer the standards based gtk--.

    1. Re:QT forces non standard c++ use by Anonymous Coward · · Score: 0

      Hooray for cross platform standard classes. You can definitely tell that QT is trying to turn itself into a platform instead of a GUI toolkit can't you? How long before it has classes that do most of what Java can do? Does QT provide any collections (standard data structures) classes as well?

    2. Re:QT forces non standard c++ use by Charley's+Angel · · Score: 1

      Yes it does, it also includes its own cut down version of the stl as well, for god only knows what purpose.

      I don't think that is really in the remit of a gui toolkit at all.

    3. Re:QT forces non standard c++ use by Anonymous Coward · · Score: 0
      QT is not a just a GUI toolkit - it is a platform toolkit, including Sockets, GUI, etc.

    4. Re:QT forces non standard c++ use by hpj · · Score: 1

      The reason for this as far as I can tell is that Qt has had these classes long before gcc supported a working STL and now keeps them to be binary compatible. I think though in 3.0 that they are STL based. When it comes to QString it is far superior to std::string since it is unicode which is really a boon when writing internationalized application. As long as you keep track of what you write/read to disk you don't have to care about different character encodings etc, it just works.

      /Mauritz
      GlobeCom AB

    5. Re:QT forces non standard c++ use by grrussel · · Score: 1

      Its not the remit of a GUI toolkit, but Qt isn't just a GUI toolkit ;-) , it also is a cross platform development platform. So it provides cross platform facilities for many activities - file access, sockets, database access, printing, font handling, Unicode and internationalisation, preference handling, XML support including SVG, various image formats, regexps, data and time classes, multimedia classes as well as a GUI builder.

      Since it tries to be as cross platform as possible, it uses the subset of C++ which is fairly portable amongst various compilers including GCC, and proprietary compilers for AIX and other Unices. Part of being portable is being tolerant of compiler differences, bugs, unsupported portions of the language and the fact that you cannot assume the most recent compiler version is available for use.

    6. Re:QT forces non standard c++ use by fault0 · · Score: 2

      > I don't think that is really in the remit of a gui toolkit at all.

      It's an application framework.

      > QT has reimplemented all those things as a rather dodgy set of proprietry classes.

      Dodgy? How do you figure? They are very high quality, and are actually more cross platform than many std:: classes are. Ever try to compile large non=Qt C++ code in HP/UX with quite broken compilers? I have, it's not pretty.

      Besides, if you knew anything about Qt, you'd see that Qt3 has stl support.

    7. Re: QT forces non standard c++ use by elflord · · Score: 1
      The big difference is that gtk-- is based on the C++ standard library, and so allows you do use familiar and efficient constructs like std::vector, std::string and so on.

      I object to your use of the word "efficient". Qt's pointer based classes derive from the void* version, so the template code is a thin type-safety wrapper. STL classes on Linux cost anywhere from 40k per instance (stdd::list) to 90k per instance (std::map) The Qt classes are much leaner because instead of duplicating code, most of the work is delegated to the void* container.

      QT has reimplemented all those things as a rather dodgy set of proprietry classes, which lock you into, for example using QString rather than std::string throughout your application, or doing a lot of extraneous conversions every time you need to talk to the GUI.

      This is not true at all. The only basic class Qt widgets make heavy use of is QString. Re that class, one can always communicate using char*

      What is true is that Qt is not just a GUI toolkit. It's more analogous to the Java standard library than it is to (for example) Swing.

    8. Re:QT forces non standard c++ use by elflord · · Score: 1
      How long before it has classes that do most of what Java can do?

      You've got a pretty good sense of what Qt is about. Yes, the java library is a pretty good analogy. I suppose it already can do a lot of what the java library can. I hesitate to say "most of", because the java library is huge, and I don't pretend to understand it. But Qt does provide sockets, database support, a plugin system, XML support, collection classes, open GL support, and threading.

    9. Re:QT forces non standard c++ use by Anonymous Coward · · Score: 0

      Look at this code:
      http://www.warmi.net/httpd/html/qt3/qtsrc/src/to ol s/qptrdict.h.html

      The way Qt implements this is much more efficient than STL stuff.
      A thin layer over void* based collection class.

      PS.
      What is this bullshit with invalid formkeys.
      This stuff happes so often it is not funny.

    10. Re:QT forces non standard c++ use by Unknown+Lamer · · Score: 2

      When it comes to QString it is far superior to std::string since it is unicode which is really a boon when writing internationalized application.

      std::wstring is generally (?) Unicode. And, you can always write your own char_traits for Unicode if you want.

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    11. Re: QT forces non standard c++ use by Anonymous Coward · · Score: 0
      I object to your use of the word "efficient". Qt's pointer based classes derive from the void* version, so the template code is a thin type-safety wrapper. STL classes on Linux cost anywhere from 40k per instance (stdd::list) to 90k per instance (std::map) The Qt classes are much leaner because instead of duplicating code, most of the work is delegated to the void* container.

      Unfortunately, Qt's approach is not a good one. First of all, it really doesn't end up saving code size, since for most applications you'll want to have all of the basic container methods inlined anyway. And if they don't get inlined, then you pay a performance penalty.

      Second, the wrappers don't really provide type safety. It's an extraordinarily bad idea to be casting pointers to polymorphic objects back and forth from void* in a library. If the object in the container inherits from multiple base classes, you are guaranteed that multiple pointers to the same object (of different pointer type) will have different values on almost all C++ platforms. When you cast from derived to base class type, the compiler adjusts the pointer value if necessary to ensure that it's pointing to the right vtable. When you cast from derived type to void*, the type info is lost and a subsequent cast to a base class type involves no pointer adjustment.

      So when multiple inheritance is involved, you can easily take a pointer of derived class type, cast it to void*, cast it back to a pointer of one of the base class types, and then jump through the wrong vtable when you call a method, resulting in either weird behavior or stack corruption. Good libraries shouldn't allow this to happen.

    12. Re: QT forces non standard c++ use by elflord · · Score: 2
      Unfortunately, Qt's approach is not a good one. First of all, it really doesn't end up saving code size, since for most applications you'll want to have all of the basic container methods inlined anyway. And if they don't get inlined, then you pay a performance penalty.

      You're sort of right. There's no free lunch, there's a tradeoff, which is to sacrifice inlining for a reduction in template bloat, and coupling. I disagree that one wants everything inlined for "most applications". For applications that involve containers of pointers of widgets, the extra indirection does not pose an enormous problem (you are already choosing indirection by using pointers and not values) IMO performance bottlenecks in a GUI application are more likely to appear in drawing methods, network overhead, and back-end computation. I've never found looking up a widget in a list to be a performance bottleneck in a GUI application.

      Qt does have value based containers for the rare occasion that you simply can't afford the indirection of the pointer based containers.

      If the object in the container inherits from multiple base classes, you are guaranteed that multiple pointers to the same object (of different pointer type) will have different values on almost all C++ platforms. When you cast from derived to base class type, the compiler adjusts the pointer value if necessary to ensure that it's pointing to the right vtable.

      I don't see why this is a problem. The exposed interface does not accept void* pointers, it would only accept base class pointers. The derived to void class never happens. You get a derived* to base* conversion (because the function prototype wants type base*), then a base* to void* conversion. I agree that it would be a problem if the exposed interface accepted void* or derived* pointers though.

      BTW, this idiom isn't terribly revolutionary. Stroustrup recommends it, Lakos (large scale C++ design) recommends it, and Metrowerks actually use iit to implement pointer classes in their STL.

      So when multiple inheritance is involved, you can easily take a pointer of derived class type, cast it to void*

      No. The derived pointer would get converted to a base class pointer first.

      Cheers,

    13. Re:QT forces non standard c++ use by fault0 · · Score: 2

      std::wstring is missing in some C++ implementations, particulaily a few commercial UNIXes

    14. Re:QT forces non standard c++ use by Anonymous Coward · · Score: 0

      because it's own version of stl is much faster, consumes less memory, and is more portable than the stl maybe?

      fuck off charley's little boy.

  32. Re:Fuck you by Anonymous Coward · · Score: 0
    excellent work, please keep it up..

    i can't wait till the day the lameness filter gets so complex and convoluted and normal post will never get through.

  33. I think we're missing the crux of this article.... by Anonymous Coward · · Score: 0

    "The company I work for is getting ready to decide on a GUI Toolkit for
    our Computational Modeling Toolkit (CoMeT, www.cometsolutions.com)."

    It was nothing more and nothing less than a way of getting tens of thousands of nerds to visit the company URL.

    The only other possibility is that he _really is_ asking Slashdot readers for programming advice. In which case he should just save us the trouble and link to fuckedcompany.com.

  34. Easy! by zensonic · · Score: 4, Funny

    Qt is 3.0

    Gtk is 1.2.x

    Sure it's friday, but come on, thats easy 3.0>1.2, so the choice must be Qt!

    Same reasoning shows that Windows 2000 are MUCH better than Windows 98 which in turn is slightly (by 3 point) better than Windows 95, which again are MUCH better than windows 3.11.

    Sigh. Does you youngsters not learn anything today?

    --
    Thomas S. Iversen
    1. Re:Easy! by damiam · · Score: 4, Funny

      So Mozilla build 20012311 must be the best piece of software ever made!

      --
      It's hard to be religious when certain people are never incinerated by bolts of lightning.
  35. Some points from using Qt. by hpj · · Score: 5, Informative

    I have been using Qt for some years now starting with Qt 1.0 some years ago. I have also tried to both patch GTK+ programs and in one instance port one of my Qt applications to GTK+ (I was preferring gnome at the time).

    The advantages I can see from using Qt is:

    * Superb design. The OO design of Qt is really thought out. There are virtual function to do all the basic things you can think of and if you think of something really clever there are lowlevel routines to do that too.

    * Superb documentation. A comprehensive, hypertext help and in Qt3 an included help browser. This is really an advantage since GTK+ not really being supported by a commercial entity suffer from lots of "I'll rather code than document" in the libraries.

    * Good migration path to new versions. I have a program consisting of ~100000 lines of code (An Oracle client http://www.globecom.net/tora) which I migrated to Qt3.0 in about 2 hours, some of that time was spent using Qt3 specific features also like docked windows where appropriate.

    * Not only a GUI toolkit. It also includes primitives for handling threading, I/O (files and sockets), UNICODE conversions and also some basic template classes made mostly obsolete now that STL is starting to actually work in GCC.

    * Truly multiple platform. The application above was ported to Windows in about a day, all of the problems related to the fact that Visual C++ understands a different dialect of C++ than most of us are used to and that took some time write around, none of it was Qt specific. The extra thread and I/O classes really helps here as well.

    /Mauritz
    GlobeCom AB

    1. Re:Some points from using Qt. by platypus · · Score: 1

      woah, your app (tora) look really nice. hmmmm, you know, postgres is a nice database, too ...

      Seriously, tora looks like a very cool effort

    2. Re:Some points from using Qt. by Anonymous Coward · · Score: 0

      You are dead wrong about the "superb OO design". There is virtually no OO design. Take the QFileDialog for example, it's absolutely horrible. Just look at the header. Ick!

      The "not only a GUI toolkit" is not a good thing. It's a bad thing. If I already have a program that uses threads and I try to use Qt, I could be screwed. And it's not just threads, it's everything. Sockets, files, strings, even lists. All of this stuff is provided by other libraries. Qt should be built so that it can work with those libraries. It shouldn't just wrap them. That limits our choices.

      I agree with your other points though. Especially the documentation.

      Mark

    3. Re:Some points from using Qt. by fault0 · · Score: 2

      > Sockets, files, strings, even lists.

      You can use those with Qt as well.

      > Threads

      You can't with most toolkits (with the nature of event queues).

      > QFileDialog

      What's so wrong with QFileDialog? It's a pretty good example of OO-design. It inherits a QDialog which inherits a QWidget which inherits a QObject. That's all very clear and easy to understand. What's so wrong with it?

    4. Re:Some points from using Qt. by Pete · · Score: 1
      Our AC friend Mark stated above (with regard to Qt):
      You are dead wrong about the "superb OO design". There is virtually no OO design. Take the QFileDialog for example, it's absolutely horrible. Just look at the header. Ick!
      I did have a look, actually, before I realised you were an AC. I saw only a perfectly normal OO/C++ header file (for those interested, src/dialogs/qfiledialog.h in the QT Free edition, version 3.0.0). Your thoughtful and detailed critique of "Ick!" doesn't lend too much insight as to the fundamental flaws in that source code that were apparently so obvious to you and so... um... not obvious to me.

      The "not only a GUI toolkit" is not a good thing. It's a bad thing. If I already have a program that uses threads and I try to use Qt, I could be screwed. And it's not just threads, it's everything. Sockets, files, strings, even lists. All of this stuff is provided by other libraries.
      ...that are not necessarily cross-platform.

      Threading systems is the most obvious example, but TCP/IP and file management also differ quite a bit between operating systems. The whole idea of using a cross-platform library like Qt is that you should be able to compile the code on different platforms with no (or very minimal) changes.

      Pete.

  36. Re: OS X port by smurfi · · Score: 2, Interesting

    The downside is that QT is slow, which is because they fake all the high-level UI calls with low-level code. That's how you can run a QT program on the Mac, but with Win32 or Motif look-and-feel.

    The HUGE disadvantage is that QT programs will never be as fast as "real" Mac programs, because all the UI stuff (bitmaps for buttons, for instance) will eat up memory space and disk access time. The other programs get the UI for free.

    It's also a practice Apple doesn't like. At all. Remember the Mozilla port?

    There's also the danger that OS X will pick up some new feature, like for instance voice-controlled mouse movement to UI elements or whatever. Every program will magically work with them, except for QT-based programs which will just sit there and look stupid until Troll gets around to update their (closed-source!) Mac port. :-/

  37. Clearly an unfair comparison... by pastie · · Score: 4, Funny

    ...as everyone knows that the software with the highest version number is obviously the best.

    (Score:-1, Sarcastic)

  38. If you want better cross platform support.. by MongooseCN · · Score: 3, Insightful

    ..make your application interface independant. The idea is to make your program a basic application that can run without a gui. The gui is then a plugin or something. That way you can take one application and write a gui using gtk, QT, win32, whatever you want and never have to rewrite the application. This is how licq works. The licq application is stand alone and you can download interface plugins for it, QT plugins, gtk plugins even command line plugins. This is great for me since QT doesn't run on the platform I use, so I have to use the commandline plugin.

    Don't lock yourself into one gui and hope that it will cover all the platforms you need, most of them don't. Allow any kind of gui to work with your program, not only is it more cross platform compatible, but other people can create guis for your application without ever have to touch the applications code.

    1. Re:If you want better cross platform support.. by elflord · · Score: 1
      ..make your application interface independant. The idea is to make your program a basic application that can run without a gui. The gui is then a plugin or something. That way you can take one application and write a gui using gtk, QT, win32, whatever you want and never have to rewrite the application.

      This is a nice idea, but very difficult to do in practice, because it basically requires you to roll your own AWT. Moreover, being able to choose a GUI at runtime is aesthetically nice, but offers little practical utility.

      IMO a simpler solution is to factor as much as possible of the core application logic into a library, so that the GUI is basically a "dumb wrapper" that delegates the real work to the library.

    2. Re:If you want better cross platform support.. by Sentry21 · · Score: 2

      This is a good idea, but a plugin interface might be more than you need if the interface is going to be your only plugin.

      A better idea might be to use #defines and #ifdefs and other magical compiler directives, write some wrapper functions if necessary, and then at compile time, decide which toolkit you're compiling for.

      #define TOOLKIT gtktk
      #include

      Or something of the sort.

      --Dan

    3. Re:If you want better cross platform support.. by Anonymous Coward · · Score: 0

      Imagine program like GIMP or even some sort of office suite being implemented as an interface independent app.
      What works for simple front-ends will never work for more complicated apps.

    4. Re:If you want better cross platform support.. by Tim+Stadelmann · · Score: 1

      This is a very good point that can't be stressed too much. Not only is it good practice in any case to program in a modular way and separate the user interface from the internal workings.

      Despite what some people claim, the UI is also very much not the right place for platform independence. Think about it, the UI is to a large degree what defines the platform, certainly from the user's point of view. If you care about the user interface you have to worry about useability and consistency with existing applications. The placement and choice of widgets, design of icons, shortcuts, MDI modes &c. will all have to depend on the platform. This cannot really be achieved with cross-platform toolkits. If you don't care about the UI, please stick to a command line interface, you'll likely end up with something less user hostile...

      In any case, designing multiple user interfaces should be easier than it sounds. You should use interface builders wherever possible, which make the choice of underlying languages (C, C++, whatever) to a large degree irrelevant. Generally, if you spend more time programming than desinging your UI you're probably taking the wrong approach.

    5. Re:If you want better cross platform support.. by Anonymous Coward · · Score: 0

      well said, one of the best pieces of advice for portability is to separate the interface from the implementation. If you use toolkit specific datatypes or functions you aren't guaranteed easy porting to any machine you choose.. but those the toolkit is ported to. Though java doesn't really have that problem.. but when doing c/c++ programming I'd suggest thought towards implementation independence from the toolkit. The gui might be a bit rough but like said in another post above you can use #ifdefs for each platform/toolkit, it may be more difficult writing like this after the fact, but a well thought out design(before implementation) should easily achieve this.

  39. FLTK or FOX (a little OT) by Omnivorous+Cowbird · · Score: 1

    Both libraries you mentioned have their disadvantages (one isn't always free and isn't normal C++, the other doesn't exactly have the best windoze support), but IMHO, FLTK and FOX both seem to avoid these pitfalls. Both support windoze and unixy platforms with X. FOX is capable of doing more things, but FLTK is as fast a heck.

    --
    ______________________________________
    Ever notice how fast Windows runs? Neither did I...
  40. OpenGL support by Anonymous Coward · · Score: 0

    As your're searching for a "GUI Toolkit for our Computational Modeling Toolkit" I guess you'll need also OpenGL support for your app. I'm doing crossplattform computer graphics together with OpenGL and I'm very satisfied with QT's OpenGL support. I also want to underline the high quality in terms of stability, consistency and documentation of the QT toolkit.

  41. GLOW, cross-platform toolkit for 3D apps by Animats · · Score: 2
    Lately I've been using, of all things, GLOW. GLOW is a cross-platform toolkit built on top of OpenGL and GLUT. The internal architecture is sound, but the widget set is sparse. I've had to fix a few problems in GLOW, but nothing serious. GLOW is on SourceForge.

    GLUT, the widely used cross-platform wrapper for OpenGL, has problems when used in a multi-window application, and those problems affect GLOW programs. I've been documenting the problems and sending them to the current maintainer of GLUT, and they may eventually get fixed. Supported platforms are Win32 and X.

    These alternatives are only useful if you're writing a 3D application. Otherwise, use one of the 2D toolkits.

  42. Also a little OT: Java SWT by PRR · · Score: 1, Offtopic

    Something to keep in mind even though it's still in it's very early stages... IBM is behind a new Java API for GUI's called SWT (Standard widget toolkit). In a nutshell, it's sort of a combo of AWT and Swing. It uses mostly native widgets (like AWT) for better performance, memory footprint, and native L&F... but also makes use of emulated widgets (like Swing) for the occasions when a particular peered component may not exist on a given platform.

    More info on SWT can be found at the Eclipse website as well as a good intro article here. Right now it supports Win32 MFC as well as (somewhat ugly) Motif for Linux, but Qt and GTK ports are being worked on. As always with Java, portability is a strong consideration, and the hope is that an app written with SWT will work on a wide variety of platforms and native toolkits.

  43. Use QT by Anonymous Coward · · Score: 0

    QT is clearly superior. If you can get your
    company to pay for it, use it. This would be
    good for two reasons: you'd get a clearly
    superior toolkit that would give you a much
    cleaner and shorter development cycle and you
    would send troll tech some support for their
    excellent work. (What they've done for the Linux
    community by writing QT is immesurable.)

    As far as my take on the gnome/kde holy war, I
    think the above paragraph speaks for itself.
    There is no substitute for coherent design. QT
    has it, GTK-- doesn't.

    1. Re:Use QT by draxil · · Score: 1

      Ah it's better because it's better? Wow what a persuasive argument.

      I think the real argument for QT is probably the fact that it is designed for C++ whereas GTK+ is designed for C. GTK-- is a fudge to get GTK+ to look like C++. Now personally I prefer GTK+, but for this project I would recomend QT because the poster wants to write in C++.

      Truely we are lucky to have a choice of such excellent toolkits. Personally I love programming in GTK+ and FAR prefer apps written in it because QT looks far to MFC for me... I think its important to note QT's headstart as well, QT is nearing version 3 GTK is not so nearing version 2.

      Basicly it all comes down to the fact that the level of choice that "free" (as in speech &&|| beer) programmers have more choice and should use the tool for the job.

    2. Re:Use QT by fault0 · · Score: 2

      > QT is nearing version 3

      Qt3 was already released over a month ago :0

      > Qt is mfcish

      I don't think so. I find wxWindows much more mfc-ish.

      But I agree with the rest of your post, use Gtk+ if you like C and Qt if you like C++. gtk-- is a rather poor hack. hopefully inti will be much better :)

    3. Re:Use QT by burnin1965 · · Score: 1

      Interesting comment on how a compiled app looks. I'll have to take a closer look. I prefer Qt for many of the reasons listed but someone might think this would lead me to use KDE vs Gnome. Well, I use Gnome for my desktop because I think it looks better.

  44. Re:Licencing... and support by SpinyNorman · · Score: 2

    I think Qt comes out ahead on the free/licensing issue; if you want to use it for free software, then Qt is GPL'd, but if you want to use it for commercial software you need to buy a licence - but most importantly that also brings you commercial support. In either case you have the source so that you can fix bugs or figure things out for yourself, but if you're working on a commercial project and under deadline pressure it's nice to have that commercial support available.

  45. My company went through this... by cjhuitt · · Score: 5, Informative
    About a year ago, the company I work for went through this. (This was before I worked for them.) The company debated the merits of Gtk-- and Qt. The basic conclusions were that Qt would (or at least, should) have the better support and documentation, and lack minor irregularities. However, when it was all computed, the deciding factor was the licensing fees. Since our software would be quasi-commercial (we are a consulting company, but for a fee, we provide companies with portions of our software as well) we would have to pay the licensing fee for Qt. This was a lot more than was thought our ~6 person (at the time) company could afford, so we went with Gtk-- pretty much only for that reason.

    Now that we have been using Gtk--, we have relatively few regrets. The documentation was poor, for a time, but they have semi-recently improved the documentation, and it is quite workable. There are some small things that you would think would be done differently, but overall they are very minor and easy to live with.

    Since we aren't concerned (yet) with porting our software, that wasn't much of an issue. Of course, your situation may be different there.

    Finally, echoing what other people have said here, Gtk-- can be quite low level at times. I would recommend that if you decide upon Gtk--, you do what our company has done. We created our own set of libraries that provide standard looks to things with minimal hassle, derived from the Gtk-- classes. An example of this would be windows. We have our own window class that sets up standard options that Gtk-- allows to vary considerably. (Additionally, it automatically checks for certain keystrokes, like the F1 key, and signals that fact.) Making a button class would be similar, so all of your buttons are approximately the same size, have the same shading, etc. We were late in figuring this out, but it has greatly simplified our code and made our program look much more consistent.

  46. XUL is too slow by HanzoSan · · Score: 1



    People complain already about Mozillas lack of speed. You cant use XUL, its just too slow, if its slow on Mozilla and Komodo its going to be slow on anything else.

    ITs a good idea, but its not practical, Java would be more practical than that.

    --
    If you use Linux, please help development of Autopac
    1. Re:XUL is too slow by Anonymous Coward · · Score: 0

      You obviously have no idea what you are talking about.

      If you want to see how fast XUL is, try using Netscape 6.x on Windows.

      You will discover Netscape's XUL interface runs just as fast as IE, or other Windows apps.

      The only reason Mozilla is still a little slow is because it still has debug code in it, and has not yet been optimized for speed.

    2. Re:XUL is too slow by Ozx · · Score: 0

      I have both of them sitting in front of me right now, and you're smoking some serious crack...

    3. Re:XUL is too slow by Clark+Kent · · Score: 1

      Really?

      I run both Netscape 6.1, and IE 5.5 on the same machine (a 128MB, 800MHz PIII).

      I am constantly flipping between the two, running Netscape when I make my own choice, or IE when it pops up automatically because I clicked on a link in Outlook.

      The fact is that they are both so similar in performance, that I tend to forget which one I am running (that is, until I happen to hit on a feature that works differently, which is usually the middle mouse button).

      Of course, one day soon I'll get around to changing my defaults to point to Netscape, so I can stop using IE altogether. The performance may be the same, but there are other reasons why I prefer Netscape, such as the better security.

  47. Whats the top complaint about Mozilla? by HanzoSan · · Score: 1


    SPEED.

    If you want apps that run slow, You are better off using Java than Mozilla, while java is slow, at least a fast virtual machine will make java seem fast.

    XUL is slow no matter how fast the comp is you are running on.

    Lets just say XUL sucks.

    --
    If you use Linux, please help development of Autopac
    1. Re:Whats the top complaint about Mozilla? by Clark+Kent · · Score: 1

      > SPEED.

      Yes, that's true.

      But we have to remember that Mozilla is still under development.

      Besides, the speed has improved a lot, recently, and they still haven't removed the debugging code, or performed the final optimization yet.

      > XUL is slow no matter how fast the comp is you are running on.

      No, that's not true.

      It isn't XUL that's slowing down Mozilla. The fact that Mozilla can be slow to start up, or open new windows, has nothing to do with XUL.

      To see XUL in action, try running Netscape 6.x on Windows (on a machine with 128MB, since they haven't optimized Netscape's memory usage yet). Now flip through the menus, and you'll see that they behave like any other Windows program. That's XUL.

      On Windows, and Linux, XUL is just as fast as other user interface tools.

      But don't listen to what I, or to any other posters, have to say about it. Try it, and judge for yourself.

  48. Re: OS X port by fault0 · · Score: 2

    > The downside is that QT is slow,

    No, in fact, quite the opposite is true. It'd be faster than solutions that simply wrap around native API calls.

    It is like in the Java world between AWT (Java 1.0.x) and Swing (Java 1.2.x). AWT tried to simply wrap around the native toolkits. As a result, it was quite slow. Swing does it like Qt, and provided an API for drawing widgets, much like Qt does with QStyle.

    > eat up memory space and disk access time.

    I think they alleviated this by using QPixmapCache. It should be only a tad bit slower, if not the same speed as regular OSX apps. Either way, an user would not know the difference in speed.

  49. Abiword by Tepic++ · · Score: 1

    Abiword is cross platform application using native widgets (GTK on Unix). You might want to have a look at how they did it. They must have sorted out cross platform printing as well and some other none GUI issues.

  50. Re: GUI threading by Fourier · · Score: 1

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

    The Qt docs have a note on threading here. From the page: In Qt, one thread is always the event thread - that is, the thread that pulls events from the window system and dispatches them to widgets. The static method QThread::postEvent posts events from threads other than the event thread. The event thread is woken up and the event delivered from within the event thread just as a normal window system event is.

    Personally, I have found that the QThread implementation is a piece of cake to work with. It's a very nice abstraction away from the syntactic ugliness of pthreads.

  51. Dr. Dobbs articles. by bigtoy · · Score: 2, Interesting

    Al Stevens provides a column in Dr Dobbs Journal titled "C Programming". In the Sept-Oct 2001 columns he described issues he ran into testing both the Qt and GTK-- class libraries. I do not have the articles here but Al gave some pretty good C++ aesthetical reasons for staying away from Qt. Specifically he mentions having to re-compile some of the Qt libraries so that he could extent their class to properly convert from a STL String to their Qt string class.

    He had many other reasons for not using Qt. When I get back to work from this long holiday I will post an outline of his specific reasonings.

    Just to clarify. I am not an Al Stevens "fan". The man really seems off his rocker sometimes. However, the articles on Qt and GTK-- were very informative. And yes, I did investigate a few of the items for myself. (Do not trust my word though, get the article, read the article, try it out for yourself!)

    --
    "A sample size of one is really just statistical masturbation."
    1. Re:Dr. Dobbs articles. by Anonymous Coward · · Score: 0

      That string (er, array :) of articles were frequently incorrect and misinformed. He made dozens of errors on the code samples, and his whole conclusion for not using Qt was based on errors in his own code, and lack of understanding of C++.

      He basically states "Gtk is cleaner than Qt when it comes to C++ friendlyness, but Qt is easier to develop." And I think that is the main point. Are you a by the book person, don't care how messy and unreadable your code is, as long as it conforms to every definition of C++, or would you prefer clean, friendly, nice, and extremely quickly written code?

    2. Re:Dr. Dobbs articles. by bigtoy · · Score: 1

      I will go and get his articles and try to clarify the points.

      I do not think being "by the book" and "having messy and unreadable code" are the same thing. The STL can be used in a clean and straightforward manner..

      I also did not discuss every definition of C++. I mentioned two areas. The string class and templates. You have interpreted that to mean "every definition of C++". Not my doing.

      He did make the statement that Qt was easier to develop, but went on to list a variety or reasons why he preferred gtk--. Again, I will go find the article and post the points come Monday when I go back into work.

      BTW, I prefer and write clean, friendly, and nice C and C++ code for the embedded world. Quick does not always come into play, sometimes works against the afore mentioned items. As I do not professionally write GUI applications I do not always have the luxury of "builder" tools.

      Regardless, I would be interested in specific information that you have that would invalidate the information in Mr. Stevens article on this topic.

      --
      "A sample size of one is really just statistical masturbation."
  52. Links: by Futurepower(tm) · · Score: 2


    GTK

    QT


    Post Comment Lameness filter encountered. Post aborted! Reason: Don't use so many caps. It's like YELLING.

    --
    Bush's education improvements were
  53. Non-native widgets by Anonymous Coward · · Score: 0
    A small point I haven't seen brought up: Qt is an excellent toolkit, but all the widgets are drawn by Qt. That gives it greater portability, but has obvious downsides.

    Gtk on Windows... well, I have difficulty imagining users accepting it, even with the Redmond/Raleigh/whatever theme enabled.

    In contrast, wxWindows uses native controls. This means it will follow the look and feel of the desktop.

    Native look and feel can make a suprising difference in the acceptability of a product.

  54. How about FLTK? by printman · · Score: 1, Troll
    Haven't seen anyone mention FLTK, but it is a cross-platform C++ GUI toolkit. It is a lot smaller than Qt or GTK+/--, and it used by a lot of the embedded Linux projects to provide their GUIs. OSX support is currently under development...

    The FLTK web site is http://www.fltk.org/.

    --
    I print, therefore I am.
  55. Re:licensing Qt == dangerous by mughi · · Score: 1, Troll
    One problem with Qt is that if any free version touches your project at any time, then you can never purchase a license and release your project commercially.

    That contamination is one aspect to watch out for. Start commercial, or stay free. You just can never change your mind

  56. Re:Licencing... NOT by mughi · · Score: 2
    I think Qt comes out ahead on the free/licensing issue; if you want to use it for free software, then Qt is GPL'd, but if you want to use it for commercial software you need to buy a licence


    Actually, this is one point where Qt comes out way behind. Gtk++ is LGPL, which frees you to build commercial apps using it with no cost. Qt has a very infectious license where if you at any time use a free version of Qt on your project, then you can never release your project commercially.



    And Trolltech dismisses shareware completely. They consider it to not be a viable approach, and so Qt can't be used for it.

  57. Isn't this premature? by Anonymous Coward · · Score: 0

    It hasn't even been settled yet, which is better: emacs or vi. And you're worrying about GUI libraries?

  58. Re: OS X port by Caligari · · Score: 1
    >It is like in the Java world between AWT (Java 1.0.x) and Swing (Java 1.2.x). AWT tried to simply wrap around the native toolkits. As a result, it was quite slow. Swing does it like Qt, and provided an API for drawing widgets, much like Qt does with QStyle.

    Not True !

    The AWT was much _much_ faster than Swing ! Swing effectively uses low level AWT code (drawing routines) to draw its own platform independent widgets, called "lightweight" components [ because they dont use native "heavyweight" peers ]. If you've ever used swing, you'll know its a dog!

    --
    The moving cursor writes, and having written, blinks on.
  59. I have experience with both... by MSBob · · Score: 2
    and some other toolkits too. Each one has its distinct advantages although if I were to make such a decision it would be a no-brainer to go with Qt. Gtk-- lacks documentation, seems to have an inconsistent API which is still in a state of flux (not good when you're trying to write an app with it that has a definite deadline on it).

    Others wrote there are other toolkits as well but IMO they are nowhere near the usability of Qt. The often mentioned wxWindows is a wrapper around native widgets meaning that things like widget alingment issues become a pain in the butt as each platform will have widgets drawn in their native size. Also widget toolkits that wrap native widgets are diffucult to extend (by class derivation) so if you need to create your EnhancedComboBox from their ComboBox it's sometimes difficult to accomplish with wrapping toolkits. Personally I think going with an emulating toolkit is better than using a wrapping toolkit (fewer headaches). If you don't agree think for a minute why Swing in Java is considered an improvement over AWT. Same reasons.

    FLTK is sweet if you don't need advanced widgets and i18n. They finally got their issues with keyboard focus fixed so it begins to look more and more like a real alternative. However, they use char* for text handling all over the place so it's certainly a disadvantage if you need unicode support. However, it is small and it is fast but it's only good enough for simple UIs.

    You can't go wrong with Qt it gives you the power of something like MFC in a more digestible form with cross platform portability to boot! Also the sheer number of widgets available for it is pretty amazing. Oh, and the slot/signal thing isn't half as bad as some people here make it out to be.

    1 vote for QT here.

    --
    Your pizza just the way you ought to have it.
    1. Re:I have experience with both... by Graymalkin · · Score: 2

      I thought Havoc Pennington's book on GTK+ was pretty good documentation. It's called GTK+/Gnome Application Development and published by New Riders IIRC. I picked it up for 14.95$ and have found is very useful.

      --
      I'm a loner Dottie, a Rebel.
  60. summary by aminorex · · Score: 1

    If we could add more detailed features to this grid, it could become a useful summary.

    --
    -I like my women like I like my tea: green-
  61. Qt Locks You In by Anonymous Coward · · Score: 1, Insightful

    If you are developing non-GPL'd, commercial software, then the fact that you have to pay for Qt is not the worst problem.

    The worst problem is that it locks you in to Trolltech as your only vendor for your UI toolkit. No one is is allowed to fork the version of Qt required for commercial apps (at the moment it happens to be the same as the open version of Qt, but there is no guarantee it will continue to be).

    Being locked in like that tends to negate the whole reason for going with Linux in the first place. It not only costs you money, but it limits your freedom, and puts you back on the upgrade treadmill.

    You are better to go with GTK, which is completely open source (LGPL), even if you are building commercial apps.

    Or, if you prefer C++, look at using the Mozilla libraries, which have also been released under the LGPL license (as well as the MPL, and GPL licenses).

    1. Re:Qt Locks You In by fault0 · · Score: 2

      > Being locked in like that tends to negate the whole reason for going with Linux in the first place.

      You're neglecting the fact that he's not just working with Linux/X11, but rather a variety of platforms.

      > which is completely open source (LGPL)

      RMS himself considers the LGPL to be less open sourceed than the GPL. In fact, he really discourages use. Qt is more pure open sourced in X11.

  62. GTK-- is not GTK+ by marble · · Score: 5, Interesting

    A lot of people seem to have missed that the question was asking for opinions on GTK-- (now gtkmm), not GTK+. The difference being that gtkmm is the C++ interface to GTK+, so no C vs C++ dilemma exists here - both are C++.

    Well, nearly. If you're from a standard C++ background (as I am), you will find gtkmm preferable, as they don't reinvent parts of the standard library (eg QList vs std::list), they use namespaces and templates (including giving familiar, STL-style interfaces to container widgets etc), and it's implemented entirely in C++ (whereas Qt is in a C++ like language that must be first preprocessed to produce C++).

    But, as someone before me said; get both, try them, see which you prefer - there are obviously people who disagree with me, as KDE and Qt are popular.

    1. Re:GTK-- is not GTK+ by Anonymous Coward · · Score: 1, Interesting

      Qt doesn't force you to use any part of their container classes, except QString. QList & co are completely optional for the programmer.

      In Qt3, you also get STL iterators.

      "Qt is written in a C++ like language that needs to be preprocessed"

      You know, I keep on reading this, and it is so completely bogus, technically, I must wonder if you actually know what C++ or a preprocessor is.

      Moc is not a preprocessor. Moc is a code generation tool. Moc takes as input C++ headers and produces C++ code. It does not produce an "expanded header" like a preprocessor (say, cpp) does.

      Saying moc is a preprocessor is as stupid as saying Visual C++'s "application wizard" is a preprocessor.

    2. Re:GTK-- is not GTK+ by marble · · Score: 1

      I know perfectly well what a preprocessor is. Moc is not the same as 'the' preprocessor, but it takes as source a language that is not C++, and generates C++. I call that processing. It happens before compilation, and is therefore preprocessing.
      It takes a language in which 'slot' (IIRC) is a reserved word, and one that does not respect namespaces etc, and produces C++.

      VisualC++'s application wizard doesn't process a source file to produce its code, so your analogy is rather seriously flawed.

      I would expect that the Qt people would agree that Moc is a form of preprocessor, as I do credit them with having a clue :)

    3. Re:GTK-- is not GTK+ by ShallowBlue · · Score: 2, Informative
      "[...] Qt is in a C++ like language that must be first preprocessed to produce C++."

      First of all that is a serious exageration! Second it does not matter even if from a esthetical point if view the preprocessing of the headers is not nice. Why? Because the decision for a specific product/venor leads to vendor lock (see Anti Patterns) in any case.

      You rely on a library. Your code will not compile if that library is not there! In the case of Qt you also rely on a little preprocessor program --- so what? If you use GTK or Win32 or MFC that don't need the preprocessor what is the difference? You cannot take your MFC program and compile it using say GTK.

      The only thing you can do is to try to introduce clear layers that separate you program logic from the GUI to contain and localize the damage in case you have to go from one GUI library to another.

      This is also my answer to the criticism that Qt (which was started in pre STL times if I am not completely wrong) uses non-STL containers. Separation of GUI and core program allow you to use more approprate/modern/protable technologies in the core. It is the architect's/designer's/programmer's choice where to use these non-standard constructs and how deep you will move into vendor lock.

      Especially tricky in the case of Qt is that Troll Tech also offers a Qt specific abstraction layer for low-level constructs like threads/locks/sockets, etc. This means that if you are not carefull your software is locked at the top and at the bottom. If these low level services are used I would recommend to wrap them into a platform isolation layer. In the case you want to change you can replace these services using the native OS constructs or libraries like ACE, etc.

    4. Re:GTK-- is not GTK+ by Anonymous Coward · · Score: 0

      "I know perfectly well what a preprocessor is."

      Apparently not.

      "It takes as source a language that is not C++"

      It takes a perfectly legal C++ header file. If you say it is not, I challenge you show what is not legal in it.
      It only has 3 macros defined in qobject.h.

      "and generates C++"

      Yes.

      "I call that processing. It happens before compilation, and is therefore preprocessing"

      Then your editor is a preprocessor. You "process" the source files, modify them, and you do it before compiling. That's silly.

      "It takes a language in which 'slot' (IIRC) is a reserved word, and one that does not respect namespaces etc, and produces C++. "

      Bullcrap. It takes a C++ header and produces a C++ source file. It can not take an arbitrary C++ header, though.

      "I would expect that the Qt people would agree that Moc is a form of preprocessor,"

      Read the docs.

      "I do credit them with having a clue :) "

      Your credit is not worth much here.

    5. Re:GTK-- is not GTK+ by vsync64 · · Score: 1
      You know, I keep on reading this, and it is so completely bogus, technically, I must wonder if you actually know what C++ or a preprocessor is.

      I would like to take this moment to point out that C++ is a preprocessor.

      Thank you.

      --
      TO BUY A NEW CAR WOULD MAKE YOU SEXUALLY ATTRACTIVE.
    6. Re:GTK-- is not GTK+ by khuber · · Score: 1
      AC: "Read the docs"

      from http://doc.trolltech.com/3.0/templates.html :

      "C++ with the moc preprocessor essentially gives us the flexibility of Objective-C or of a Java Runtime Environment, while maintaining C++'s unique performance and scalability advantages. It is what makes Qt the flexible and comfortable tool we have today."

      -Kevin

    7. Re:GTK-- is not GTK+ by Anonymous Coward · · Score: 0

      Can you explain, though, what is so wrong about the moc preprocessor, or whatever you want to call it? If it makes code that looks cleaner, neater and easy to understand, then what's the problem?

      As someone else said, to compile the qt code you need the libraries and headers anyway, so what if you need the moc too?

      Criticism of the moc just for the sake of it seems like pedantry with no foundation in logic.

      Nick

  63. Use Mozilla's XPToolkit and XUL by Anonymous Coward · · Score: 1, Interesting

    Mozilla's XP (Cross Platform) Toolkit would seem to fit your needs.

    Mozilla's XPToolkit is:

    - Written in C++.
    - Cross platform (Windows, Linux, Solaris, MaxOS, and others).
    - Open Source and free of charge.
    - LGPL'd - You can link it and distribute it with binary-only applications.
    - High quality.

    For proof of the last point, try running Netscape 6.2 on Windows, or Mozilla 0.9.x on Linux.

  64. Re: OS X port by fault0 · · Score: 2

    Swing was initially much slower than AWT. However, as optimizations were made, it became almost as fast as AWT. If you have used a modern java, you'd know this :)

  65. Re:Licencing... NOT by fault0 · · Score: 2

    > Qt has a very infectious license where if you at any time use a free version of Qt on your project, then you can never release your project commercially.

    Huh, what FUD. Qt has nothing of the sort.

    > And Trolltech dismisses shareware completely. They consider it to not be a viable approach, and so Qt can't be used for it.

    No they don't. If you have a commercial license, you can sell as much properitary, close source shareware as you want. If you use free Qt, you can sell as much of open sourced shareware as you want.

  66. Re:licensing Qt == dangerous by fault0 · · Score: 2, Flamebait

    That's complete bullshit. Qt's commercial license has no clause like that. Only Qt's educational program has something like that, and no one is talking about that here.

    Go away, troll.

  67. Cuz it's crap (examples failed when I tried them) by Szplug · · Score: 2, Informative

    I was examining cross platform GUIs a couple years ago, and gave wxWindows a try; it's ugly (full of arbitrary little macros) and, as the subject says, when I installed it and tried their example programs, some either failed to compile (or more likely) failed to work (my memory is unclear). Overall my impression was that it was a mess. Now, that was 2 or more years ago, but I haven't heard much about wxWindows since. We went with Qt, and it's clean & fast; I prefer it even to MFC (which admittedly may not be saying much).

    --
    Someday we'll all be negroes
  68. GTK--/Qt are not the only choices by VZ · · Score: 3, Informative

    [disclaimer: my real email address is @wxwindows.org]

    > Not supprisingly we've come up with two choices,
    > GTK-- and QT.

    This surely is surprizing to me. I wouldn't consider GTK-- a serious choice for writing Win32 programs - sure, it "works", but have you seen it and/or used any GTK+ programs under Windows? But I would consider FOX, FLTK and wxWindows as serious contenders to Qt.

    I can't speak of the others but let's compare wxWindows and Qt:

    1. wxWin has almost all of the features Qt has
    (it doesn't have some, but then it has some extras)
    2. wxWin is free (as in beer too) for all uses
    3. wxWin has native LNF, even under Windows XP
    (which can be a serious advantage if you
    target this platform).

    But try it for yourself - wxWindows 2.3.2 is scheduled for Dec, 2 and has quite a few interesting new features. And see www.wxwindows.org for more info.

    1. Re:GTK--/Qt are not the only choices by Anonymous Coward · · Score: 0

      I _really_ wish someone did a wxWindows port to Qt, so that wxWindows apps on X11 had a native look and feel in KDE with the rest of the desktop.

  69. More complete list of links: by Futurepower(tm) · · Score: 5, Informative


    GTK:
    GTK

    QT:
    QT
    Excellent QT Tutorial

    wxWindows:
    wxWindows
    wxPython

    Mozilla:
    Mozilla
    Cross-platform implementation of COM
    develop your UI's in an XML dialect called XUL

    Others:
    FLTK
    Fox Toolkit

    Side-by-side comparison of GUI Toolkits:
    The GUI Toolkit and Framework Page

    I needed this list for my own use. Maybe it will be of interest to you.

    --
    Bush's education improvements were
  70. Re:Cuz it's crap (examples failed when I tried the by Anonymous Coward · · Score: 0

    You are talking about something that 2 years old... I work every day with wxWindows and it rocks... There is very few bugs, it's fast, it's native, very good documentation... and it's on the lgpl.

  71. Re: OS X port by Ozx · · Score: 0

    That's what I do for a living, and you're quite daft if you think Swing is faster than AWT...

    AWT's problems have nothing to do with execution speed, and everything to do with trying to stick one shoe on everyone's foot without chopping off toes...

    Damn Java trolls and their karma.

  72. GTK+ C++ wrappers, more experiences by mscheid · · Score: 1

    I've been working on a Voice-over-IP research prototype during almost the whole last year. I had been using Qt up to then and decided to switch to GTK-- mainly because it doesn't need a meta compiler as Qt does.

    Frankly, that decision was a mistake (I'm not speaking of GTK+ here, no flame intended). Gtk--'s documentation is far from being complete, or even up to date. I had massive problems with threading, too (Especially thread termination behaved very odd at times). Furthermore, some of the cooler widgets from GTK+ were missing, ie. you'd have to roll your own wrapper class for those..

    If the choice is restricted to using Qt or GTK--, go for Qt.

    1. Re:GTK+ C++ wrappers, more experiences by Electrum · · Score: 1

      've been working on a Voice-over-IP research prototype during almost the whole last year. I had been using Qt up to then and decided to switch to GTK-- mainly because it doesn't need a meta compiler as Qt does.

      What's wrong with their meta compiler? qmake is great, as it handles everything for you. moc is very fast, an order of magnitude or two faster than g++. It's g++ that really slows down compilation, not moc.

    2. Re:GTK+ C++ wrappers, more experiences by Anonymous Coward · · Score: 0

      or just avoid gtk-- and use gtk+ directly. more documentation, and its not someone else's wrapper. besides gtk+ compiles happily alongside c++ code, the callbacks may be a bit awkward but that can be handled fairly easily. I don't know I just don't like c++ wrappers, I dislike mfc too, but normal native win32 api never did anything that seemed like voodoo magic to make my programs run, and I didn't have to worry about any parts of my program being untouchable due to the ide needing to process stuff on its own. But then event handling in mfc is different anyways.

    3. Re:GTK+ C++ wrappers, more experiences by murrayc · · Score: 1

      That is not true. All of the GTK+ 1.2 widgets have been fully wrapped for at least 1.5 years now and the GNOME widgets have been fully wrapped for 6 months. The APIs have been completely binary and source stable ever since.

  73. Who modded this as troll? by Wavicle · · Score: 1, Troll

    You know this is just one kind of crap that is really killing slashdot. There is nothing trollish about this post. If someone's opinions differ from yours, that doesn't make them a troll. If someone's experiences don't favor your favorite toolkit, that doesn't make them a troll. Read the moderator guidelines or, if you can't, go into your user preferences and remove yourself from moderator participation.

    --
    Education is a better safeguard of liberty than a standing army.
    Edward Everett (1794 - 1865)
    1. Re:Who modded this as troll? by bigtoy · · Score: 1

      Read the arguments used to argue his side. Most of them are pandering and pointless. Read my prior response. Kdevelope? Snappier? I mean, a good number of the comments were "trust me" I know something. Definately needed the troll mod. I hope it shows up when I metamoderate. I will fully agree.

      --
      "A sample size of one is really just statistical masturbation."
  74. gotta love it. by Anonymous Coward · · Score: 0

    unbiased moderation! three cheers for slashdot dumb-fucks!

  75. Qt Free needs X11 by yerricde · · Score: 1

    To pick up your point on licensing, Qt is either GPL or pay.

    Heck, Qt is either X11 or pay. If you use the free version of Qt, you need to install Cygwin/XFree86 on all Windows machines that deploy your app.

    --
    Will I retire or break 10K?
    1. Re:Qt Free needs X11 by fault0 · · Score: 2

      No that's not true.

      Heard of Qt non-commercial on windows?

  76. all you need is FLTK by SkewlD00d · · Score: 1

    FLTK -- cross-platform, C++ gui, and it works: 'nuf said.

    --
    The biggest trick the devil pulled was letting lawyers become politicians so they can write the laws.
  77. Re: OS X port by fault0 · · Score: 2

    no, I said that the diffence in speed between Swing and AWT can't be felt anymore.

  78. PerlQt? by Glorat · · Score: 1

    This is my first look qt QT and based on the comments here, it is obviously the way to go for cross platform GUI development.

    Now, I have my love with Perl too and I'm trying to find the latest Perl QT binding but couldn't find one! All I have found is PerlQT which really stopped 4 years ago. Is there no interest for this?

  79. Re: OS X port by Ozx · · Score: 0

    > > The downside is that QT is slow,

    > No, in fact, quite the opposite is true. It'd
    > be faster than solutions that simply wrap
    > around native API calls.

    The difference can be felt in memory consumption and rendering glitches and a reduction in responsiveness...

    There's nothing wrong with the theory of Swing, but they still need to hammer on the implementation...

  80. So use something that's not "quite broken" e.g.GCC by yerricde · · Score: 1

    Ever try to compile large non=Qt C++ code in HP/UX with quite broken compilers?

    Easy.

    1. Download GCC source code.
    2. Use your K&R compatible C compiler to build GCC.
    3. Use GCC to build GCC and G++.
    4. Compile large non-Qt C++ code in HP/UX with quite unbroken compilers.
    --
    Will I retire or break 10K?
  81. Gtk+ on Win32 is NOT a one-man job by Xiphoid+Process · · Score: 2, Insightful

    It is a officially supported first-rate platform being developed in the main Gtk+ CVS tree.

    --
    got drum'n'bass?

    http://mp3.com/vitriolix
    1. Re:Gtk+ on Win32 is NOT a one-man job by Anonymous Coward · · Score: 0

      However, it's not updated much.

      And yet, if you try using gtk-- on win32, it can't even compile!

      I recommend wxWindows or Qt depending on how much money you have. Qt is best choice with money and wxWindows is best choice without.

    2. Re:Gtk+ on Win32 is NOT a one-man job by fault0 · · Score: 2

      Uhm, does GTK-- run on Win32? Last time I checked it didn't.

  82. Not GTK, GTK-- by Anonymous Coward · · Score: 0
    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.

    The Ask Slashdot was for QT versus GTK--, not GTK. From http://gtkmm.sourceforge.net/:

    Gtk-- (gtkmm) is a C++ interface for the popular GUI library gtk+. Gtk-- provides a convenient interface for C++ programmers to create graphical user interfaces with Gtk's flexible OO framework. ...

    Just FYI.

  83. Why not WxWindows? by tankrshr77 · · Score: 1

    It's very cross platform widget set and application frameweork and it's development is pretty advanced.

  84. Qt is better by Anonymous Coward · · Score: 0

    I have switched from GTK to Qt because the documentation in GTK became exceptionally frustrating to use. Qt's programming model seems to be much better as well.

  85. So Qt tries to become QT? by yerricde · · Score: 2

    it also is a cross platform development platform. So it provides cross platform facilities for many activities - file access, sockets, database access

    Just MySQL and PostgreSQL, or does it also talk to common proprietary DBMS such as oracle, sybase/mssql, etc?

    printing, font handling, Unicode and internationalisation

    How big does a distribution have to be to include glyphs for all 50,000 or so Unicode UCS-2 characters?

    preference handling, XML support including SVG, various image formats

    How much of the price of a Qt license covers the Unisys royalty for a popular "various image format"?

    regexps, data and time classes, multimedia classes

    Multimedia as in video playback? Is Qt trying to become like the other QT?

    Does it handle press/release semantics for keypresses, or just press/repeat? Does it handle joysticks (erm, "industrial control devices")? Does it handle reading mouse motion not limited by the four walls of the screen (necessary for object manipulation in a 3D environment)? Does it handle sound?

    Yes, I'm getting into the domain of Allegro or SDL, but only to show that Qt isn't the be-all and end-all of application toolkits.

    --
    Will I retire or break 10K?
    1. Re:So Qt tries to become QT? by fault0 · · Score: 2

      > Does it handle sound?

      Yes it does.

      > Yes, I'm getting into the domain of Allegro or SDL, but only to show that Qt isn't the be-all and end-all of application toolkits.

      Allegro and SDL aren't application toolkits.

  86. Re:Fuck QT, Fuck Windows and motherfuck Prince by Anonymous Coward · · Score: 0

    Heh. I wish I could get that story posted :)

    -- spiralx

  87. GUI Toolkit Page, gtk-- alternative? by mlinksva · · Score: 1
    http://www.atai.org/guitool/ provides a very informative matrix of available toolkits with notes about language/OS support, license, and more. The author claims Qt is "best".

    I thought someone was doing an alternative (to gtk--) C++ gtk wrapper, but I can't find it now.

    1. Re:GUI Toolkit Page, gtk-- alternative? by mlinksva · · Score: 1

      Nevermind, I was probably thinking of Inti::Gtk, which seems moribund. Found in a Gnome bindings matrix.

  88. Gtk works for me by Anonymous Coward · · Score: 0

    I've been using GTK in HMI/HCI area as a rapid prototyping tool for military simulators/trainers for over a year now. I've have no complaints and have no plans to stop using it. It's great.

    I did have a look at Qt when I started. I wasn't impressed with it. It looks pretty drab and is controlled by one company. What if they go belly up or change the licensing?

    1. Re:Gtk works for me by Anonymous Coward · · Score: 0

      "What if they go belly up or change the licensing?"

      Yes, what if?

      Well, the answer is: nothing. Qt becomes licensed under the BSD. Check out the KDE FreeQt foundation docs in www.troll.no

      Same if development stops, or they stop the free version, or change licensing.

    2. Re:Gtk works for me by fault0 · · Score: 2

      > What if they go belly up or change the licensing?

      Then Qt would automatically be released under the BSD License.

    3. Re:Gtk works for me by Anonymous Coward · · Score: 0

      Did TT say that????

  89. look at wxWindows and other toolkits by vscjoe · · Score: 1
    There are several other cross-platform toolkits out there, some free and some commercial. wxWindows is quite good, uses Gtk+ on Linux, and has a very Windows-like feel to it when programming. It also now comes in a very lightweight "universal" flavor and will probably come in an embedded version soon. (I kind of view wxWindows as the "real" Gtk--.) wxWindows also comes with nice cross-platform non-GUI libraries (networking, image handling, etc.), as well as platform specific classes for things like ActiveX on Windows, classes that you can use conditionally to make your application behave more like a native app.

    FLTK is very lightweight and easy to use. It is used extensively on handheld Linux devices. FLTK1 lacks some functionality that you may need, but FLTK2 is shaping up to be quite complete.

    Also, Qt is not the only game in town for commercial toolkits. If you want something commercial, look around. In the past, other commercial toolkits had much better tool support than Qt.

  90. Qt 3.0... by Anonymous Coward · · Score: 0

    now includes STL compatibility. So basically you can take iterators from the containers that the widgets work, QList for example, on and run them trough an STL algo like, say, sort(), which is pretty sweet.

    Now if you'll excuse me I have to get back to my Junkyard Wars marathon.

  91. Re: OS X port by fault0 · · Score: 2

    And awt was slower/had less features on some platforms than others. I distinctly remember awt on MacOS being much slower than on windows, and not even using the System8 Toolbox calls, but rather using very antiquated calls.

  92. ACtually, Gtk2 *is* designed for Win32 by Sleepy · · Score: 2

    Well, sure there is a difference between "designed for" and "ported to" (tho for some "designed for" means "press release for").

    GTK 1.x was always portable -- designed so -- because the GDK was an abstraction layer that allowed porting to nearly anything someone had a desire to port onto (win32, framebuffer, whatever). I've used GTK under Python, and while it's slower than native Windows UI, it's more than acceptable for GIMP.

    This fellow really needs to prototype some stuff using *each* of the closest candidates. If his schedule does not include time for prototypes, the software will be ready for a code rewrite MUCH sooner than they expect. I do Software QA, and I've seen the effects of rushing a project without proper homework up front. You *always* throw away some code, like it or not...

    >However, Gtk2's win32 port will likely remain a very unsupported port.

    Opinion presented as fact. There are *many* projects using GTK on Windows... just like there are many Qt projects on Windows. They're just ot very prominent (aside from GIMP).

    .. And from what I read on the mailing lists, GTK 2.0 will be "officially supported on Windows (whatever that means), and the rendering rewrite has eliminated that "slow redraw" problem of GTK 1.x.

    Cheers..

  93. Fltk by Anonymous Coward · · Score: 0

    Both Gtk and Qt look bloated when compared with FLTK. It is LGPL so it can also be used to build commerical applications without additional licensing. Qt on the other hand is GPL for free or commerical license for purchase. And FLTK is a true C++ UI like Qt.

  94. Re:Some _REAL_ points by Anonymous Coward · · Score: 0
    QT is C++ from the ground up, GTK-- is wrapping GTK++.

    So?

    So Qt has one less layer of abstraction, and can be designed to take full use of the OOP facilities of the language. GTK-- is an unholy mess. Inti is the best attempt to wrap it for OOP, but that's still in the alpha stage.

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

    Why?

    So you can access the flipping databases without worrying about half a million other libraries which are different across each platform. It's a simple multiplatform solution - the vast majority of custom apps these days use databases to story their information.

    QT comes with a very good interface builder.

    Use vim.

    What kind of a dozy answer is that. You muppet! I can cobble together a full dialog, complete with references to callbacks, in less that three minutes with Designer. It'd take at least 15 to type out all that shit in Vim. Please not, that Vim, unlike Emacs say, is *just* a text editor, and was never supposed to be anything else.

    QT based programes feel snappier than GTK based ones.

    Opinionated

    I've no experience here, the only Qt programs I use a lot are Designer and Opera. They certainly feel good, but I haven't noticed the difference.

    With Kdevelop you have access to a very good IDE.
    Use Vim.

    Does VIM automagically create autoconf/automake files, AUTHOR, CHANGELOG and README files, and automatically add license text to all your files when you create them. Does it have project management facilities. Does it have a built-in debugger and CVS support. No! And why... because it's a flipping text editor!.

    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.

    Clearly you've never worked in a company before. Time is paramount. People don't have the luxury of trying out several memory management issues - it's gotta be done, and done fast and safely. Even GTK programmers agree Gtk-- got a bit carried away. Look out for the Inti project in the Redhat Advanced Labs for a better option created by disgruntled Gtk-- developers

    Gtk is more commonly used then any other brand. Sure it sucks, but it sucks less.

    Depends. Qt is used far more by businesses than GTK (in fact I haven't heard of any commerical app written in GTK, where's the Gnome equivalent of theKompany and Opera - Ximian doesn't count - it's mainly just a UI distro). Part of being a company's product means there's professional and comprehensive documentation, and support also (for a price admittedly), but for a professional product it's the best solutions.

    Also don't forget theres's stable versions for almost all Unices, Win32 and MacOSX. Gtk is currently only stable on Unices, and beta on MacOSX and Win32
  95. GTK+ and Objective C by Nicopa · · Score: 2, Interesting

    As it was mentioned before (and many times) GTK+ is coded in C, but is still object oriented. It uses an ad-hoc object system with dynamic typing, single inheritance. It's clean, but it's rather clumsy looking. If it had some kind of pre-processor it would look much nicer... wait! that would be just objective C! Wouldn it be nicer to have implemented gtk in Objective C? Just a random thought..

    1. Re:GTK+ and Objective C by Anonymous Coward · · Score: 0

      What would be far cooler would be to port the GCC ObjectC compiler to use GTK+'s object model. You'd have to use a more dynamic language like ObjC rather than a static language like C++ or Java since GTK+'s object model is partially dynamic.

  96. Try FLTK by Taco+Cowboy · · Score: 2, Interesting



    Try FLTK { www.fltk.org }

    You won't be disappointed with the Fast and Light Tool Kit.

    For download, go to ftp://ftp.fltk.org

    --
    Muchas Gracias, Señor Edward Snowden !
  97. Have you tried FLTK ?? by Taco+Cowboy · · Score: 1



    Before you've tried FLTK, you won't know how powerful and intuitive a ToolKit suppose to be.

    You can download the ToolKit from ftp://ftp.fltk.org

    --
    Muchas Gracias, Señor Edward Snowden !
    1. Re:Have you tried FLTK ?? by baxissimo · · Score: 1

      Well it is fast and light, but it is also seriously lacking in features and flexibility. I tried using it about a year ago, got frustrated trying to make a window lay out the way I wanted it to, and gave up eventually.

      In contrast, I tried out Qt over the summer, worked through all the excellent documentation and tutorials, and have had basically nothing but pleasant surprises the whole way. It's not a perfect toolkit, but it's a whole heck of a lot closer than anything else I've tried, including FLTK.

    2. Re:Have you tried FLTK ?? by Taco+Cowboy · · Score: 1



      What you said about FLTK is true, circa one-year-ago, but do try FLTK today, since it has improved quite a lot.

      Even Mr. Alan Cox has pleasant comments about FLTK , look at his "diary entries", some months back.

      By the way, the newest stable branch of FLTK is 1.0.11, and the new 1.1 branch is in beta testing.

      And if that's not enough, there's a version 2.0 in development (sort of like proof-of-concept thingy) for the past year or so... Search in the "bazaar" section in the FLTK website (www.fltk.org) and you can download the much-in-development version 2.0 and test it out !!

      I am not saying that QT isn't good, what I'm saying that FLTK has grown up quite a lot, for the past year !

      --
      Muchas Gracias, Señor Edward Snowden !
  98. Re: OS X port by Anonymous Coward · · Score: 0

    Emulation doesn't have to be slower. It's not as if the OS widget drawing code uses special hardward acceleration that is not available to user space apps.

    Many applications (even applications developed by the OS vendor) have custom widgets that are drawn by the application. If custom widgets can be drawn fast then emulated standard widgets can be drawn fast.

    In regards to QT programs never being as fast as 'real' Mac programs because real programs get the UI for free. Well that's false, Mac programs don't get the UI for free, every button created costs memory. Furthermore since QT is a high level toolkit it can save memory through caching (eg of clip regions), and data sharing (eg of string data). Lower level toolkits (Carbon) have less opportunity to benefit from such techniques (the application developer must take care of it).

    Regarding QT not being able to benefit from new features on Mac OS X. I can only guess you are not a developer. Qt apps are carbon apps, if Apple introduces new features that all Mac Apps can benefit from then Qt apps can benefit. If a new feature doesn't work on a Qt application then I wouldn't be surprised if it doesn't work on applications that have custom drawn widgets (which is most large apps).

    You claim Qt on the Mac is closed source. It is not closed-source in the sense that the full source code is provided. (Note, this doesn't mean it is open source).

    In general your criticisms are based on unfounded assumptions and you appear to lack first hand knowledge of developing with Qt on the Mac.

  99. Re:Licencing... NOT by mughi · · Score: 1
    > Qt has a very infectious license where if you at any time use a free version of Qt on your project, then you can never release your project commercially.

    Huh, what FUD. Qt has nothing of the sort.

    Yes it does. You should at least read the Trolltech FAQs. Check this one on their General FAQ:

    Q: Can we use the Free Edition while developing our non-free application and then purchase commercial licenses when we start to sell it?

    A: No. The Free Edition license applies to the development phase - anything developed without Professional or Enterprise Edition licenses must be released as free/open source software. [emphasis added]

    > And Trolltech dismisses shareware completely. They consider it to not be a viable approach, and so Qt can't be used for it.

    No they don't. If you have a commercial license, you can sell as much properitary, close source shareware as you want. If you use free Qt, you can sell as much of open sourced shareware as you want.

    Again, no you can't. Check their FAQ on that on the Qt Free FAQ or the one on their non-commercial FAQ. Basically it says that you should either go free or full commercial.

    IANAL, but you need to get one to go over the license agreement carefully. Given current and past Trolltech FAQs and statements, and their interpretation of the contracts, you need to tread carefully here. Trolltech's position seems quite clear: start by paying or stay forever free/open.

  100. Try ZooLib - C++, multithreaded, MIT License by goingware · · Score: 2
    Try ZooLib. It is written in C++, it's multithreaded, and it is released under the MIT License (same license as XFree86).

    --
    -- Could you use my software consulting serv
    1. Re:Try ZooLib - C++, multithreaded, MIT License by infiniti99 · · Score: 2

      Except that according to the Zoolib page, there is no support for pull-down menus? Come on now, this is a serious project the guy is asking about.

      Gtk is not a cross-platform contender, FLTK is too limited, and Zoolib is unfinished. Perhaps these would be good recommendations for other projects, but definitely not for cross-platform desktop application development. Normally I would recommend free software above others (although Qt is GPL on X11, so it's tough to complain), but in this case the other options are not even viable. Qt has been multiplatform from the start, and stable for years.

      The only real competition for Qt seems to be wxWindows (based on the comments), which I have yet to check out. Even so, with Qt you get commercial support, something you won't find in any of these others. Really, Qt is the obvious choice for professional cross-platform development.

  101. cross-platform compatibility by Anonymous Coward · · Score: 0

    Hello everyone...

    I'm working on a PhD at the moment, and I've been trying to build an application which was relatively cross-platform, which essentially needs database and socket support, eventually with some developed UI for administration.

    At the moment I'm stuck with Java, which for speed of operation and ease of programming sometimes leaves a lot to be desired. I've also had more than a few issues with making the code operate on different versions of VMs and on different operating systems. Java is not the compatibility panacea that people sometimes make it out to be.

    What has been said here, especially with regard to QT's I/O capabilities has been very interesting, and I will investigate further. Many thanks to all of you :)

    I have been meaning to develop a KDE version of my appication parallel to my Java development, and now it seems that this might be the better route. I don't know if it is, but I will research it...

  102. GUI Toolkit Design by lprimak · · Score: 1

    The problem with the most GUI toolkits is that the implemenation is in a programming language.
    When you look at a GUI and strip the application functionality, it is "described", not "programmed". Thus, it is best to use a description language, and not a programming language to create GUIs.
    The main benefit of this is that you get separation of the GUI and functionality in a very natural way, and also have flexibility to change the GUI without having to touch functionality of the application, thus achieving object-oriented design throughout the GUI.

    Toolkit such as Mozilla/XPToolkit/XUL is designed with this in mind, and is cross-platform, so I would recommend it as the toolkit to use.
    Also, same applies to Motif with libXmt, but it lacks cross-platform support of Mozilla.

    Any other description-language based GUI toolkits out there? Let me know.

    --
    Lenny Primak PP-ASEL-IA,Heli
    1. Re:GUI Toolkit Design by khuber · · Score: 1
      I agree! This should be modded up.

      I don't have an opinion on XUL since I haven't used it, but I hope more GUI toolkits appear that use XML descriptions. Developing a GUI when you have to modify code is tedious. And auto GUI code generators are just the wrong way to solve the problem.

      I don't know why people bash XUL's concept. Even if it's true that XUL isn't efficient, I don't think that means that the concept can't be efficiently implemented. Programmers scoffed at compiled languages once too since they thought they could write better programs in assembly. IBM had to mandate that its programs be written in FORTRAN so that they didn't look like hypocrites when selling their FORTRAN compilers. And they were better for it, IMO -- popularity and variety of programming languages surged right after that. How many large applications are written in assembly these days?

      Software evolution is all about moving to higher levels to develop more sophisticed applications. It's probably true that XUL won't be as efficient as your hand-tuned assembler making direct X protocol calls, but hey, nobody is stopping you from doing it :).

      It's not that foreign when you think about it - every web page uses HTML, which is a page description language. Web apps use ASP, JSP, or templates to separate out presentation. Can you imagine designing web pages for a website with Swing? And programmers are often terrible at designing GUIs - separating the presentation layer opens doors for nonprogramming designers to easily modify the interface.

      -Kevin

    2. Re:GUI Toolkit Design by lprimak · · Score: 1

      Excellent on all points.
      It is an understatement that programmers don't know how to design GUIs, and they are further burdened by the complexity of using a programming language to do this.

      I don't know how this moderation here works, though.

      --
      Lenny Primak PP-ASEL-IA,Heli
  103. Does it have to be C++? by BlueGecko · · Score: 1

    If you were willing to be flexible with language, then I would take a very serious look at Borland's Delphi and Kylix. You'll get a toolkit that's been extremely well-tested and is thoroughly evolved, an extremely fast Pascal compiler that compiles thousand-line apps in literally seconds, a GUI builder, strong use of components, and literally a recompile with no changes to move from Windows to Linux. The one major problem I see here is that Kylix is still is more of a Linux than a Unix app. However, it and its executables ought to run fine really on pretty much any Unix that can run a Linux emulation layer (which includes Solaris, FreeBSD, and a few more). At any rate, if you could deal with the language (which is extremely pleasant to work in if you take the time to learn) and the potential Linux lock-in doesn't bother you tremendously, it would probably be the easiest and fastest development solution you could pursue.

    1. Re:Does it have to be C++? by Sludge · · Score: 2
      an extremely fast Pascal compiler that compiles thousand-line apps in literally seconds

      I'm sorry, but is that supposed to be fast? Compilation is mostly about header files unless you are using pch.

    2. Re:Does it have to be C++? by Anonymous Coward · · Score: 0

      Pascal doesn't have header files. Java's import system was stolen from pascal.

  104. Re:licensing Qt == dangerous by mughi · · Score: 3, Informative
    That's complete bullshit. Qt's commercial license has no clause like that

    No, it's not. All the free licenses have that. non-commercial, free, educational, etc. Check the TrollTech General FAQ

    Q:Can we use the Free Edition while developing our non-free application and then purchase commercial licenses when we start to sell it?

    A: No. The Free Edition license applies to the development phase - anything developed without Professional or Enterprise Edition licenses must be released as free/open source software. [emphasis added]

    That, along with the FAQs, statements, etc. from Trolltech's past seem to make it clear. Go check their site yourself. Perhaps have a lawyer check the mentioned Professional and Enterprise Edition licenses and let us know if you're right and Trolltech is wrong.

    Go away, troll.

    I'm not trolling, just trying to point out issues with the Qt licenses. If you start with a commercial license and never want to ship shareware with it, or if you start with the proper free license of your project and keep it open-source forever, then it's not bad.

  105. Re:Cuz it's crap (examples failed when I tried the by Pete · · Score: 2, Informative
    Hi Szplug (hmm, Tintin fan?)
    I was examining cross platform GUIs a couple years ago, and gave wxWindows a try; it's ugly (full of arbitrary little macros)
    The macros aren't arbitrary, but there are a fair few of them though. I guess there are a few techniques you can use to help manage event handling - Trolltech uses C++ extensions, wx uses macros. Once you get used to them, it's not really an issue.

    and, as the subject says, when I installed it and tried their example programs, some either failed to compile (or more likely) failed to work (my memory is unclear).
    I've only been using wxWindows for about a year, so I can't really comment on how easy older releases were to get working. But I can say that the current ones work fine - if you're willing to give it another go sometime, you may find life a lot easier.

    Overall my impression was that it was a mess. Now, that was 2 or more years ago, but I haven't heard much about wxWindows since.
    It's not a mess. It's not as slick and nice as Qt, but it's very stable and reliable and certainly not a mess. And while the wx documentation is solid and perfectly usable for a capable C++ programmer, it's not as complete or as well-written as Trolltech's Qt documentation. I still mention the Qt documentation to co-workers as an example of what tech documentation should be - I've never seen anything to match it.

    We went with Qt, and it's clean and fast; I prefer it even to MFC (which admittedly may not be saying much).
    *grin* Indeed it is not. But yes, Qt is a very very nice GUI library ... and not just GUI either. Doxygen is a good example of an application that for a long time used Qt even though it (Doxygen) didn't have a GUI - just because the cross-platform abstractions were so useful.

    I certainly wouldn't recommend you change from Qt to wxWindows... I do think Qt is technically superior to wx, but there are reasons why you might find wx more appropriate for future projects with different needs. Try installing wxPython and have a look through the demo app - I find this a great way of showing off the features/functionality/look/feel of wxWindows to people, even if all the demo apps are written in Python. You can get a good feel for the way the same apps would look in C++ even if you don't know much about Python.

    Pete.

  106. Re:Some _REAL_ points by GiMP · · Score: 2, Troll

    Yes, vim is just a text editor. Which is exactly my point. You have an application for each function you need to do, and thats it. No bloat, no mess.

    Why would I want an app to do my Automake/Autoconf stuff? So I can spend days debugging it? So I don't learn anything and become dependant clicking a mouse? Its so easy to click those buttons in Kdevelop when I'm ssh'ing to my application server.

    I must admit that I've never used Gtk--, as I don't write code in C++. I have written code with Gtk+ and Gtk-perl, and I found it quite easy and enjoyable.

  107. Take another look at Java + Swing by Cola+Junkee · · Score: 1

    Sorry to sound like a Java booster,

    But you should really take another look at Java and the Swing toolset. Swing is fully MVC-based (well, MV mostly), has good visual builder tools available, is fast (contrary to popular opinion), and has tons of features, and support from a vibrant community of developers.

    Unless you're tied to C++, you should strongly consider this, as porting is (virtually) a no-brainer. In fact, even if you need to use C++ for some parts of your system, it is still possible via JNI to tie these in, and write the GUI in Java.

    As far as I know, the only GUI toolset that has more features than Swing is Motif, and that's saying a lot since Motif was under development for years and years.

    Furthermore, there are tons of decent components (beans) available, both freely and commercially. Also, tons of documentation exists for this platform, most of it of excellent quality due to the nature of javadoc.

    You're doing yourself a disservice if you're ruling it out because you (subjectively) consider it to be slow or otherwise unfit for the job.

    --

    f u cn rd ths, u r prbbly a lsy spllr.

    1. Re:Take another look at Java + Swing by Anonymous Coward · · Score: 0

      Yes, I especially like Java MFC programming with beans.

  108. Korelib by Anonymous Coward · · Score: 0

    I don't think anyone here has mentioned Korelib. Korelib is a The Kompany project and currently supports: Linux, FreeBSD, BeOS, AtheOS, and Win32.
    It has a signal/slot mechanlism that is similar to what's in Qt, is supports scriping via Python, and supports plugins.

  109. Some REAL babble (was Re:Some REAL points) by Pete · · Score: 2, Insightful
    > See above. Kdevelop also makes it easy to set up
    > automake/autoconf build methods, even for people
    > who aren't familiar with them.

    Those people have no business doing software development.
    Um... yeah, riiiiight.

    There are lots of things in the world of software development. Lots of languages, lots of miscellaneous helper tools. Lots of IDEs. I've never used automake/autoconf in my development career, and I've never needed to. Hard as it may be for you to believe, autoconf/automake familiarity is neither necessary nor sufficient to be a good software developer, in C++ or any other language.

    I also reckon that you believe WYSIWYG "html editors" have a place? Maybe for my 10 year old female cousin, but not for anyone else. Yet again, they shouldn't play the game if they are afraid of the ball.
    I get the feeling you'd say that a UNIX sysadmin who wasn't familiar with (and confident enough to modify directly) /etc/sendmail.cf has no business doing UNIX system adminstration either. Even if they were adminning a system without sendmail running? Hmmm.

    Personally, I actually do think that WYSIWYG "HTML editors" have a place. I also think applications like Lyx have a place. It's just a shame that at the moment there aren't any standout contenders in the HTML side that focus on generating standards-compliant HTML (at least as far as I know, I'd be happy to be corrected on this point).

    As an aside, is there any particular reason you say "my 10 year old female cousin," rather than just "my 10 year old cousin" or "a 10 year old child"? Are you trying to imply that she's doubly disadvantaged in being ten years old and female? Or perhaps even more disadvantaged in that she's your cousin?

    SQL is a backend issue, there are no reasons for it to be tied into a toolkit.. if so, it is the worst form of bloat.
    I assume you meant to say "GUI toolkit" there... as a statement like "there's no reason to tie SQL into a database toolkit" would seem more than a little bit senseless.

    Hard as this (again) may be for you to believe, but Qt is not just a GUI toolkit. GUI stuff is a large part of it, but not the only part. I mentioned in another comment that I know of one app, Doxygen, that used Qt without using any of the GUI stuff - simply because the author really like the fact that it abstracted the low-level platform-specific stuff so nicely.

    The other major issue with QT is the terrible licensing. It still sucks, and I doubt it will ever not suck. I would never base my software on something that will make it as valuable as a pile of rubbish one day.
    I love it when people say something "sucks" and offer absolutely no explanation as to why they think it sucks. Try. Come on, have a go. Tell us why the terrible Qt licensing system sucks. Lots of other people in this topic have at least made an effort (and in the process demonstrated that they don't know what they're talking about), but I'm sure you can do better than them.

    IDE.. hah, I'd like to see you use Kdevelop on a text terminal.
    Um... yeah... I'd like to see you use Quake on a piece of paper.

    WTF are you babbling about? If you want to restrict yourself to using a text environment, do so. Nothing stopping you. Of course, if you're supposed to be developing a GUI application, you might not be able to test it at all, but I'm sure that doesn't matter for someone like you.

    Have a nickle, get yourself a real computer.
    Gee. A whole "nickle". Thanks.

    Pete.

    1. Re:Some REAL babble (was Re:Some REAL points) by GiMP · · Score: 2, Troll

      A text environment is not a restriction, it is directly oppossite of such. It is the only environment capable of being productive.

      Sure, I can't play quake on a piece of paper.. although I can play it on a terminal.. However, that is not the point. Quake is a game..
      KDevelop is an IDE.

      When you are doing development which doesn't require more then a text editor, why limit yourself to learning a GUI environment? That will be really helpful when ssh'ing to your box or X windows crashes.

      And yes, I assumed that QT is a GUI toolkit because anything more would be terrible bloat. It shouldn't become a library for providing everything.

      I laugh when I hear people who think that pointing and clicking is faster then Vi commands and the power of the shell.

    2. Re:Some REAL babble (was Re:Some REAL points) by Keith+Russell · · Score: 2
      A text environment is not a restriction, it is directly oppossite of such. It is the only environment capable of being productive. (snip) I laugh when I hear people who think that pointing and clicking is faster then Vi commands and the power of the shell.


      When did "the right tool for the job" go out of style?

      I couldn't imagine laying out VB forms in code. It's perfectly natural to build visual user interfaces with a visual tool. Before Java IDEs hit the market, I tried some AWT forms, and I felt like I was working blindfolded, compiling and running every once in a while to see if I was hitting my targets. That may make for good Vaudeville, but it's a major PITA when you're trying to make a deadline. Code-compile-run cycles are no substitute for a proper UI builder.

      Conversely, I'm glad Microsoft didn't follow the route of "wiring" UI components together in the builder. Every IDE that tried such techniques ended up fatally counter-intuitive. Builder for layouts, code for logic. Form follows function. There's a reason modern IDEs work this way.

      If all you're doing is non-visual code, then more power to you. Long live %EDITOR_OF_CHOICE%. But you'll have a very hard time convincing me that clicking a toolbar button and dragging a rectangle on a form is slower than:

      'Probably not right, but I'm trying to prove a point: You don't do VB this way!
      Dim btnFoo As CommandButton
      Set btnFoo = New CommandButton
      With btnFoo
      .Parent = frmBar
      .Width = 1095
      .Height = 375
      .X = frmBar.Width - 90 - .Width
      .Y = frmBar.Height - 90 - .Height
      .Caption = "Long way 'round"
      End With
      --
      This sig intentionally left blank.
    3. Re:Some REAL babble (was Re:Some REAL points) by GiMP · · Score: 2

      I do a lot of backend non-gui stuff. but I do do GUI stuff as well, and when I do.. I type. I don't let anyone write my code for me.

      And I wonder why all the software these days has such stiff requirements, there is no reason that we need anything over a PentiumII or Amd K6 processor.. other then the fact that too many programmers are lazy point and click fools.

    4. Re:Some REAL babble (was Re:Some REAL points) by Keith+Russell · · Score: 2

      What environment are you using? Some IDEs are much better than others at code generation.

      RE: System Requirements: Netscape turned links purple when you moved the mouse over them, and now everything has a mouse-over state. Menus fade, unroll, and slide. Qt added themes to respond to GTK+ themes. Microsoft said "If you can't beat 'em, join 'em" when WindowBlinds got hot. Mac OS X can't do a damn thing without some fancy whiz-bang animation.

      Stuff I wrote in VB was snappy on a 486! Of course, that was when our apps were certified on Windows 3.1 and NT 3.51, which preferred efficiency over eye candy. My code hasn't changed a bit: I ask for a button, I get a button. If the OS needs more CPU power to draw alpha-blended borders and shadows over a textured background and throb every color of the rainbow when the mouse pointer is over it, well shame on the OS. All I asked for was a button.

      --
      This sig intentionally left blank.
  110. Don't matter by applejacks · · Score: 1

    Just choose one and fly with it. I like C so I use GTK. It has a wrapper for C++ and extensions for perl, fortran, and etc. GTKPerl. QT is also nice but I think your limited to using C++. Don't quote me on that statement. I got this from a friend, read it, its funny. I don't really know if its true or not. Heres the link. http://www.geocities.com/jss1228us/cplusplus.html

  111. GUI Designers by Shadowlore · · Score: 1

    GTK has Glade, which will develop the UI, and export the code in a variety of formats. Furthermore, with use of libglade, one can alter the UI without recompiling. Since I don't use Qt, I cannot say if it has something similar.

    As far as code writing, I've found that with glade, I basically just write my back end.

    Personally, if I were a C+fuss nut, I'd just use wxWindows. IMO, though, I think the question is more appropriately GNOME vs. Qt, but that is just MO.

    --
    My Suburban burns less gasoline than your Prius.
  112. Re:licensing Qt == dangerous by ecampbel · · Score: 2

    Please mod parent UP, and mod grandparent down. mughi's original comment was unjustly robbed of karma. QT's strange licensing restrictions need to be brought to light.

    --

    Sig goes here
  113. well, no by Anonymous Coward · · Score: 0

    C++ is a language. Being a language, it doesn't *do* anything, let alone preprocess something. C++ compilers do contain preprocessors, though, if that was your point.

  114. Re:licensing Qt == dangerous by fault0 · · Score: 2

    uhh, that was valid a few years ago, but not now.

  115. Gtk+ -- My toolkit of choice. by serial+frame · · Score: 1
    Gtk+, as many other things, may have a bit of a learning curve (somewhat of an understatement). With "unrememberable" calls like gtk_button_new_with_label() and such scattered about, it makes Gtk+ an unmaintainable hodge-podge.

    Or not...

    Gtk+ is actually much more organised and beautiful than many other toolkits I've seen in my day. It is well maintained, and the object-oriented design on top of C is actually quite consistient throughout. Standards such as using g_ for prefixing Glib calls, gtk_ for Gtk+ calls, gdk_ for Gdk calls, and Gtk for Gtk+ datatypes (the same for Gdk, but just a 'g' for Glib) help keep things organised.

    The signal and callback model of Gtk+ is also a winner, in my opinion. Using gtk_signal_func() to attach a function to a widget when a given signal is emitted also keeps things organised.

    On the other hand, Gtk+ programs generally take a few more lines to write than Qt apps. Even so, even the simplest of Qt 'hello world' programs outweighs one of Gtk+ by many kilobytes of RAM.

    Although Gtk+ isn't quite as cross-platform as Qt (Gtk+ makes it possible using the Gdk layer), Gtk+ is still a definant winner in my opinion, in terms of performance, stability, and consistiency.

    Then again...Photon isn't that bad... ;)

    --

    -
    And the Angel said unto me, "These are the cries of the carrots! The cries of the carrots!"
  116. Re:licensing Qt == dangerous by mughi · · Score: 2

    Well, that is currently on their website, and not hidden either. They reference all other FAQ's there, and still have it as-is. Their FAQ's were even reved just this past mid-July and then late-September, so there's no excuse on their part. (Oh, and their GPL faq also includes the no-shareware mention)

    If TrollTech has changed their position (and not just made an exception here or there), then the burden is on them to 1) Change their FAQ's that state all this (non-free and no-shareware), and 2) actually put the commercial licenses somewhere that they can be easily accessed.

    If they have changed their terms, then at the least this looks like scare tatics on the part of marketing to try to get more developers to cough up the per-seat licensing.

  117. Re:licensing Qt == dangerous by fault0 · · Score: 2

    1). It's not in the FAQ in their souce code.
    2). It's not enforced. I know of several apps that this case has happened with. For example, Quanta Plus->Quanta Gold, KDE Studio->KDE Studio Gold, Pixie->Pixie Plus.

    So, I think that this is probably an honest mistake on their part for leaving it up in their general FAQ (it belongs in their academic licenseing FAQ).

  118. Allegro is a multimedia app toolkit by yerricde · · Score: 1

    Allegro and SDL aren't application toolkits.

    SDL may not be (doesn't even have drawing primitives), but Allegro is much closer, provided that the application falls into the 2D or 3D multimedia domain. For example, Allegro includes its own Unicode implementation and its own file access API (to allow transparent use of compressed datafiles). It also has a wealth of addon libraries including AllegroGL for hardware accelerated graphics. Check it out.

    --
    Will I retire or break 10K?
  119. Qt non-commercial is not GPL compatible by yerricde · · Score: 1

    Heard of Qt non-commercial on windows?

    • Not GPL compatible, not even free software. Heck, the QPL is freer than the Qt non-commercial license. This license issue is a blocker for all apps designed to link against Qt Free Edition under GNU GPL or that use libraries licensed under GNU GPL.
    • The non-commercial license is not available at all on Mac OS X unless the user installs an X11 server.
    --
    Will I retire or break 10K?
  120. Re:So use something that's not "quite broken" e.g. by jkellmer · · Score: 1

    5. Sit in front of you machine, waiting for gcc taking minutes to compile even simple and small sources.
    6. See you shared loader producing bus errors on several "valid" executables compiled by gcc
    7. Ask your third party software vendor to supply a gcc compiled version of the library you are desperately needing.
    8. Compare the speed of the executables compiled with aCC and gcc; start crying.