Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

minimal cross-platform gui lib? [closed]

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?

like image 237
Nils Pipenbrinck Avatar asked Jun 17 '09 11:06

Nils Pipenbrinck


People also ask

What is the best cross platform GUI?

Flutter: The First Choice for Cross-Platform GUI Development.

Does C++ have GUI libraries?

The C++ standard library does not contain any GUI functions as Java or C# do, but there are many useful external libraries that you can install.

Is an open source widget toolkit for developing rich efficient and portable GUI applications?

SWT is an open source widget tool kit for developing rich, efficient and portable GUI applications. It was originally developed by IBM and being maintained by Eclipse Foundation along with Eclipse IDE. It is an alternative to AWT and Swing.


2 Answers

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.

like image 152
Gian Paolo Ghilardi Avatar answered Sep 22 '22 20:09

Gian Paolo Ghilardi


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.

like image 36
jrharshath Avatar answered Sep 22 '22 20:09

jrharshath