Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to make a simple cross platform GUI in C++? [closed]

I want to produce a desktop application with a very simple GUI (a background graphic, a cancel button and a progress bar).

My main targets are Mac and Windows.

Is this possible using Visual C++ 2008?

Can anyone point to any examples using Visual C++?

Or is there a better way to create the GUI separately?

like image 944
joshcomley Avatar asked May 22 '09 10:05

joshcomley


3 Answers

Use Qt4. http://qt-project.org/

This is a self containing framework which contains developers tools, GUI builders, String/IO/XML/Thread classes, Audio/Video controls, HTML widgets and many, many more features. It's built to be completely multi-platform, one code for all systems.

In contrary to wxWidgets, it feels more object-oriented, and has by far better documentation and its better maintained.

See it online: http://qt-project.org/doc/qt-4.8/

EDIT- 6 years since the original Answer. I should point to Qt5 - http://www.qt.io/

like image 111
elcuco Avatar answered Sep 23 '22 02:09

elcuco


I would recommend wxWidgets. It's crossplatform and works with Visual C++.

There's also Qt (see Colins post) which is what KDE (Linux desktop manager) uses. It has a more restrictive license though.

like image 33
Skurmedel Avatar answered Sep 25 '22 02:09

Skurmedel


You can also have a look at FLTK

FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX®/Linux® (X11), Microsoft® Windows®, and MacOS® X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL® and its built-in GLUT emulation.

FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK also includes an excellent UI builder called FLUID that can be used to create applications in minutes.

Here are some quickstart screencasts

like image 39
epatel Avatar answered Sep 23 '22 02:09

epatel