Cross platform GUI toolkit

Started by
14 comments, last by brx 12 years, 3 months ago
Hi all, I'm currently thinking to start a new spare time project, and would like to have advices about which GUI toolkit could fit my needs. Up to now, I've considered Qt and wxWidgets, but I'm looking for something more lightweight (if such thing exists). To be honest, I've already tried to set up wxWidgets on Eclipse without luck, so perhaps it is not really what I want :-(

Requirements:
-Should be available on windows and linux (mac would be a welcome plus)
-Lightweight and easy to both install and use (no much time to spend on the project, and would rather spend it on the core than the GUI)
-Based on standard c++

Bonus:
-Python bindings (I might want to add scripting capabilities)
-OpenGL support

Not required:
-I don't need it to look like a native app (no host widgets used under the hood required), as long as all common widgets are provided and the interface is nice to look at.
-I don't need the toolkit to provide other facilities (network/threads/sound/database...): boost and other tools are good enough, and probably even better, and I don't need many other features anyway, since it would be an image manipulation app.

I could consider to use Java, but I'm going to do quite intensive image processing and there are wonderful c/c++ libraries which could help (FreeImage and the like) not to mention the performance issues.
I'm open to suggestions on this as well, though, if you think that a good option would be another language (that is Java: no python, as I'm not good enough with it, and no c#, since .net is only theoretically cross platform :-)

There could be more to say, but let's start with that. Any advice?

Thank you all!
Advertisement
If Python bindings are important to you, then that throws a lot of weight behind wxWidgets...
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

If Python bindings are important to you, then that throws a lot of weight behind wxWidgets...

Though there are also reasonably mature bindings for Qt, too. I can't contrast it to wxWidgets as I've never used that library, in or out of Python.

cignox1: depending on how lightweight you really want it, simply using glut/freeglut might be an option. There's stuff for menu bars, context menus, etc, and it's pretty easy to hack together some basic buttons with OpenGL. I fear the reality of the situation is that all the mature GUI libraries do indeed come with a lot of other baggage, due to a combination of N.I.H syndrome, their age/legacy, cross platform support, etc
Unfortunately there's not a lot of choices for cross-platform GUI toolkits if you want to restrict yourself to C/C++. Not sure why exactly, my best guess is that Java has covered the cross-platform requirement for quite a while now.

+1 for wxWidgets here too. Qt is advertised as a GUI toolkit but it has grown into an entire framework, so it's ridiculously heavy if you just want a basic interface. I'm not a fan of Qt for this and a couple other reasons to be quite honest.

As for Python bindings, I'm pretty sure there are bindings for both wx and Qt. I remember doing Qt/KDE programming in Python when I was using a Linux operating system. (Unless I'm being mistaken with Ruby programming.)
There's also Juce ... which has a lot of nice features e.g. embedding cross-platform image resources. No python bindings as far as I know however (There is a PyJuce project but it doesn't look like it is alive)
If You care about python embedding and GUI, why not to try to create the whole app in Python, and just make the speed critical parts in C++? There are many GUI tools for python, also "built in" in standard python modules, so maybe it is a way to achieve Your goal? And Python is cross-platform by definition, so it could solve a lot of problems at the very beginnig.
Thank you all for your advices.


Unfortunately there's not a lot of choices for cross-platform GUI toolkits if you want to restrict yourself to C/C++. Not sure why exactly, my best guess is that Java has covered the cross-platform requirement for quite a while now.
[/quote]

I don't refuse to consider more options: indeed, working with java would be perhaps more pleaseant and it would simplify implementing a plugin system, should I ever reach that point. I could do a deeper search to check if libraries to handle images i/o exist, expecially for HDR and other non web related formats.


If You care about python embedding and GUI, why not to try to create the whole app in Python, and just make the speed critical parts in C++?
[/quote]

I'm not good enought with phyton to even consider it as a viable option. The only reason to have python bindings is that once the app core is completed, it would be nice to allow for extensions.
That said, it does not hurt to give it a look to see if with the right IDE (and a GUI designer) I can change my mind :-)

I though to add a word about the license I need: as I don't have any idea about what I will do with the code, I would like to be left free to make a decision later in the process, so no GPL. LGPL would be OK though, I suppose. Both wxWidgets and Qt satisfy that requirement (and of course Java and Python do).
OK, I've given a look to two more options:
-Java: I have been unable to find a good image input/output library supporting common image formats suitable for graphic image manipulation, something similar to FreeImages or DevIL. Any advice on this?
-FLTK for c++ as a GUI toolkit. Any opinion to share about that lib?
I would recommend Qt. It works on all the desktops and most mobile and embedded platforms. It is skinnable. It has well-supported Python and C++ bindings. It is a collection of libraries, so if all you want is GUI all you use is the GUI and the Core libraries, but other things like threads, networking, OpenGL, XML,multimedia, and others are there and well integrated if you want to use them. It's small, fast, mature, professional, commercially supported, and under active development. It just works.

Qt also has QML, and ECMAScript-like language for contemporary software development style, so you can engage in current development modes as well as legacy C++ ones.

Stephen M. Webb
Professional Free Software Developer

FLTK definitely satisfies the lightweight part.

Although you should be careful when choosing its version:
http://en.wikipedia.org/wiki/FLTK#Versions

There a multiple examples of using FLTK with OpenGL:
https://www.google.com/search?q=fltk+opengl

As for Python bindings, see:
http://pyfltk.sourceforge.net/
http://www.fltk.org/wiki.php?LC+P139+TC+Q

This topic is closed to new replies.

Advertisement