views:

474

answers:

4

Hi.

I'm looking for a minimal and easy to learn C or C++ cross platform gui library.

In a nutshell I only need the following functionality:

  • application window
  • menu bar
  • some simple dialogs, File-open and save. Maybe a user-written one.
  • user canvas where I can draw lines an circles on.
  • some kind of message/event loop mechanism.

Target platforms would be Win32 and linux. MacOS would be nice to have but is not important at the moment.

Why am I looking for something minimal? I don't want to spend much time to learn a big and full blown abstraction system for a really small application. The easier and leaner, the better.

Any suggestions?

+4  A: 

I don't know about minimal, but Qt is pretty easy to learn.

Its light-weight enough to run on embedded devices, so you be the judge.


EDIT after seeing the comments:

Yes, Qt is a fullblown application framework, but here's my case: an app with cross platform GUI but other platform-dependent code is not really platform independent. I don't think moving existing C++ code into Qt entails any work at all. If anything, this would allow Nils to use his existing C++ code, and only use Qt for a GUI. But of course, I assume that the existing C++ code is portable.

Here Be Wolves
You can't call QT a minimal gui framework, it's a full blown application framework with a lot a abstraction going on. That's exactly what Nils does not want!
milan1612
He put the emphasis on being easy to learn, with the hidden assumption that big framework == long time to learn. Qt is a big framework but you can use ony 1% of it without being worried by the rest, and it's the easiest GUI toolkit that I have ever used.
Bluebird75
indeed, using the Qt GUI builder is one of the best things I've ever experienced. I never thought Drag-n-drop GUI builders could ever be programmer friendly.
Here Be Wolves
+7  A: 

If you need something small, try FLTK libs: I used them at work (embedded development) and I think it's a valid option. Maybe apps are not as "cool" as QT-based ones, but developing with FLTK libs is fast and easy.

Gian Paolo Ghilardi
nathan
If you look at something minimal, I definitely agree with that
egapotz
+2  A: 

See http://stackoverflow.com/questions/115045/good-c-gui-library-for-windows for relevant answers.

Personally, I would go with Qt, now that it's open. You don't necessarily want a minimal library, you want one that is easy to use, and quality documentation and community support will give you just that.

Small projects have the nasty habit of sticking around and picking up scope -- as things get hairier, you don't want to be stuck with some small library that nobody knows about.

Tiberiu Ana
+3  A: 

wxWidgets (formerly wxWindows) is a widget toolkit for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with minimal or no code changes. It covers systems such as Microsoft Windows, Mac OS X, Linux/Unix (X11, Motif, and GTK+), OpenVMS, OS/2 and AmigaOS. A version for embedded systems is under development.

http://www.wxwidgets.org/

Warrior
+1 for OpenVMS.
Travis Beale