Gui Toolkits, Which Should I Use

Gui toolkits, which should I use?

For C++, in my opinion, Qt is the least frustrating and most fully featured toolkit. Its also fully cross platform. Note that Qt will be LGPL licensed some time in March 2009, when version 4.5 becomes available. Currently, its only offered in a GPL and commercial license version.

Qt's GUI designer is good. It has lots of utility functions (scene graph library, translation support, built-in Javascript engine, built-in WebKit library). Via the MOC (a special pre-compiler) it also brings a few run-time binding capabilities and introspection to C++.

For your technical application, you might find that Qwt (http://qwt.sourceforge.net/) provides what you need. It is built upon Qt.

Qt can even be used "headless" if you want its utility support (such as networking, etc) without a GUI.

The other cross platform C++ option is wxWidgets, which is usable but not really comparable to Qt. Its a much lower level toolkit, and isn't as easy to use or fully rounded. Gtkmm is another option, in the spirit of GTK+.

Should I use a cross-platform GUI-toolkit or rely on the native ones?

If you have the expertise, use native frontends, it'll effectively double the job you have to do for UI but from my experience non-native UI is a little bit clunkier than their native counterparts.

What GUI framework should I use?

I also suggest to choose a RCP (Rich Client Platform) rather than just a basic GUI toolkit (such as Swing, SWT, Windows Forms, WPF,...).

This leaves you basically with 2 choices:

  • NetBeans Platform (Swing based)
  • Eclipse RCP (SWT based)

Choosing a GUI framework

I personally would recommend PyQt, which is both aesthetically pleasing and is simple to implement. It is well structured, well documented and cross-platform. The syntax is pretty clean, the classes are easily extendable. There is a nice GUI editor called Qt Designer, which allows fast prototyping. The .ui files it creates can be directly loaded into PyQt (checkout PyQt4.uic.loadUi).

I cannot say anything about licensing, though - you have to figure out yourself.

Practical GUI toolkit?

I would go with Qt. It works on all the major platforms, and it's being continually improved. You can also get started really fast.
There are bindings for Java, Ruby and Python.

Plus it's free if you're writing open source programs.

Which GUI toolkit would you use for a touchscreen interface?

Check out the Windows Presentation Foundation (WPF). It uses XML (XAML) to define the interface and it is therefore quite easy to create an interface which would be easy to use with the touchscreen.

.NET 3.0 required.

What are the differences between different GUI toolkits and language bindings?

You're writing this question as if you've never used the these toolkits. I'm not really sure what the actual question is here. Have you ever used Swing? Does that seem as the same level of productivity as the .NET WinForms API? Really, saying anything about any of these will just lead to a flamewar or series of downvotes. There are differences. Of course, there are many similarities. A lot of that has to do with many of the fundamental constructs you need in an event driven GUI programming environment, such as a message loop. Of course, there are probably many other ways to do it but it is a proven method.

I don't know of any that "radically" break from this. Probably the most different GUI library for general purpose GUI applications I know of is from REBOL with its VIEW:

http://www.rebol.com/docs/view-guide.html

However, in reality its not "radically" different.

One big difference in productivity is the tools for these different toolkits have very different levels of maturity. You're kind of asking two questions. One question is more theoretical: "Are any of these toolkits fundamentally different?" and the other is about productivity and that is "Are there differing levels of productivity for the various toolkits?" The first question is very debatable. The second question has the clear answer: Yes.

There are many questions to ask. First what programming language or platform will you be using? Do you need portability to different platforms like Windows, Mac OS X, and Linux? Will it be just Windows or just Linux? Obviously, you wouldn't want to use WinForms on Linux (or Gnome/KDE if anyone wants to be pedantic). You could use GTK+ on Windows, but the "widgets" won't have same look and feel as those offered by native Windows toolkits. You could choose Swing, but it is really only available in Java and has its own issues. I don't think Swing has a great level of productivity, personally. I think having to add all these "adapters" and connections all this "layout" gook is not that productive. Some people do though.

Another aspect is the selection of built-in widgets your chosen toolkit holds and what the selection is among third-party free and commerical widgets. If you choose a more obscure toolkit, you won't have as many exotic sort of widgets to choose from. For instance, you would find a Mac OS X style "dock" widget for .NET WinForms and probably a few others but maybe not in GTK+ (actually, it probably exists there, but its just example).

So, in short, I don't think you can really say that all the GUI toolkits are just interchangeable. There are many other issues to consider than whether they have base widgets and message loops.

What is the best library to use when writing GUI applications in C++?

Qt, hands down.

it's the most complete, most mature, fastest framework available. and on top of it, it's seriously multiplaftorm and your choice of commercially friendly open source or paid support.



Related Topics



Leave a reply



Submit