What is a simple, testable, cross-platform C ++ GUI?

I want to create a very simple GUI for a C ++ application. Unusual, design and advanced features don't matter. However, what's important is that I can write automated tests against it, programmatically checking the contents of the fields and the click buttons. It should also work on at least Linux and Windows, preferably Mac as well. Any suggestions?

Edit: open source tools are highly preferred.

+3


source to share


5 answers


Sorry, I was a little late with the answer.

There are many options in GUI programming. However, since you say you want something simple without manicure and eye candy, the choices narrow down a bit. Here are my suggestions:

QT

Pretty awesome. I hate to sound like a Nokia (or Trolltech) evangelist, but this structure has it all. Mature API, Good Design, Platform Independence, The Flexibility You Name! However simplicity? Well ... it's not a strong point, in fact, QT is the complete opposite. He tends to be more on the extremely heavy and heavily armed side, definitely not easy.

GTK +

Again, pretty cool. Supports fewer platforms than QT, but has a fairly mature API, works on all platforms you mentioned, the design is very cool too. Flexibility? Well, the new GTK + 3 is very flexible, but GTK + 2 (the current last supported version for Windows) is not much in that regard. It's easier than QT, but less eye candy, etc. But it relies on a ton of third party libraries, which is a slight disadvantage on some platforms.

For a comparison of the two above, see one of my previous answers .

FLTK



Honestly, IMHO is the toolkit that best suits your needs. It's simple, platform independent, very easy to deploy and cross-compile, and quite mature (although this community isn't as active as GTK + and QT). It's based on OpenGL and looks pretty much the same on all platforms (I don't know if it's pro or con in this case). It got a pretty soft license, you can statically link the entire library, no dependencies other than OpenGL. Works on all platforms supported by OpenGL.


I want to create a very simple GUI for a C ++ application. Unusual, design and advanced features don't matter. However, what's important is that I can write automated tests against it, programmatically checking the contents of the fields and the click buttons. It should also run on at least Linux and Windows, preferably Mac as well.

Overall, from the requirements you mentioned, I think FLTK is perfect for you. Although you should also look at the other two if you are not satisfied.

Update

Testing Structures :

Unfortunately, I have not seen any good testing schemes for FLTK. For QT, there is QTestLib. There is dogtail for GTK .

+3


source


Suggest using Qt as above. It is mature and new features are being added. To test applications written in Qt, you have the following options.

And some more ideas in QtCentre



Update: . Since there is support for Python and Qt in pyqt , creating a test suite using something like pyunit would be a good option

I don't know the level of support for other libraries, but wxwindows and GTk are good competitors

+3


source


Have you looked into the Qt library? http://www.qt.io/

+2


source


+2


source


You can try fltk, it is cross platform and lightweight. Another choice is qt

0


source







All Articles