c++cuser-interfacegui-toolkit

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


Possible Duplicate:
Gui toolkits, which should I use?

I've got a fair bit of C/C++ experience - mostly for writing console application for Windows/Linux, and also a fair bit of C# experience - generally for writing WinForms applications etc.

I'm extremely impressed with with ease at which I can create a window in .net, for example something as simple as

Form form = new Form();
form.ShowDialog();

is enough to get a blank form up on the screen. In fact,

new Form().ShowDialog();

is technically enough as long as we don't mind losing reference to the form after it's closed.

I've tried writing some windows-based GUI stuff in C++ using windows.h, but not only does the learning curve seem a little steep but also the syntax is extremely verbose. Creating a simple window like the above mentioned single line .net implementation can easily exceed 2 dozen lines using windows.h.

But not only that, if I were to port the application over to Linux/Max (something which I can pretty much never do with .net, with the exception of hacks like mono etc), then I would need to rewrite 95% of the GUI code.

I'm assuming this is where frameworks come in, for example QT etc... (I don't really know much about gui frameworks, I'm afraid).

What GUI frameworks do you recommend? which are the most powerful and which are the easiest to use? How do you generally tackle the task of coding your GUI in C/C++?


Solution

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