Should a person new to window applications learn X, GTK + or what?

Let's say the factors for evaluating a choice are the library of available widgets, the slope of the learning curve, and the degree of portability (the platforms on which it works). Since language binding is on, I use C ++.

Thanks!

+4
source share
11 answers

Pure X these days is pretty hardcore and not very portable. Basically, there are three main tools:

  • GTK + (and C ++ - GTKmm wrapper)
  • Qt
  • Wxwidgets

which are quite comparable, so choosing is a matter of taste. All three work on the main three operating systems, although GTK + on Mac and Windows is a bit uncomfortable.

+11
source

Qt is very good. It has a fairly large library (and not just a user interface). It works on many platforms.

+11
source

My personal favorite: Qt . It is cross-platform, it is very intuitive, it is widely documented, there are bindings for many languages ​​(the original is C ++), and it’s actually interesting to develop with it.

+8
source

If you are not planning on writing your own user interface toolkit, it makes no more sense to use X directly. Too complicated, too much work.

On Linux, you have two main options: GTK and Qt. Both work fine. Qt works better as a native C ++ toolkit than GTK itself, although GTKmm is a decent C ++ wrapper for it. GTK can usually be used from more languages ​​than Qt, but it doesn’t matter if you use C ++ anyway.

Both are cross-platform, but GTK feels somewhat alien to other operating systems, especially Mac OS X. Qt feels completely native on Windows and pretty close to Mac OS X. It also provides many other cross-platform functionality outside the user interface. such as streaming, file system access, networking, etc. It seems that Qt will at least win on the portability front.

In general, come with something popular - there is more chance of finding good examples, ready-made applications that you can analyze, libraries that you can use, or even just find help here.

+3
source

As you requested the widget library for C ++, I would suggest QT, which was created for this programming language; GTK is good too, but it was created for C (as well as for many libraries created for the GNU project, which has C privileges against C ++).
No one uses X directly when creating an application; the only people who work directly with X are the ones who create the new widget library, as previously reported by other people here.

+3
source

GTK + this: works on most Linux and Windows distributions.

Of course, there are both Qt and WxWidgets, which are cross-platform.

+1
source

In my opinion, the best C ++ GUI tool is Qt http://qt.nokia.com

This is a cross-plateform (windows, mac os x, linux), efficient and has quite a few nice extensions (Qwt, Qwt3d, QGLViewer, ...)

On the other hand, if you want to learn about GUI programming , I would study quite a few systems, including GTK, Tk, Motif.

+1
source

I suggest getting a general book on graphical interfaces. I used Borland framework, Windows, wxWidgets, QT and PEG. Thus, there is no standard, but a GUI system - Event Driven. Study event-driven programs and this should give you a great foundation.

+1
source

I think you can start with wxWidgets.

0
source

If you are most familiar with those interested in C, GTK + is a good place to start. If C ++, QT is probably the best choice. Your desktop of choice is also a factor. Gnome uses GTK +, KDE uses QT.

Raw X programming is very small to get you started. Very few programs are written directly against the X API directly. It always had drafts of tools. Some of the older toolboxes are Motif (Lesstif) and Athena. Do not try to start with them, but they are very old.

0
source

I think there is another problem that you did not talk about: where do you want to go?

  • Do you want to "just learn it" or do you have a specific application?
  • If you have an application, you may also need to consider:
    • what OS do you plan to run on
    • How does the community support this: actively? Is it hard to get help?
  • what performance do you need / expect?
  • How long do you plan to maintain it? (you can decide to run H ^ H ^ Hmove away from C ++ in a few years, and if so, does it make sense to use a different language - i.e. Java?)
0
source

All Articles