PDA

View Full Version : Basic GUI in C++



nerdpride
October 30th, 2008, 05:13 PM
Hello people of the internet. I was wondering were is the best place to start programming GUI in ubuntu. I know c++ and am a little tired of terminal applications. I know there are various layout softwares out there. Does anybody know where I can find a guide to a good one.

Idefix82
October 30th, 2008, 05:16 PM
This is the best place to start:
http://www.gtk.org/
Under the "Documentation" link there are a couple of tutorials, among others this newbie tutorial:
http://zetcode.com/tutorials/gtktutorial/

Good luck!

nerdpride
October 30th, 2008, 05:24 PM
Thanks. I would close the thread but i want to take a poll. Who Prefers GTK+?

snova
October 30th, 2008, 05:25 PM
Asking about the "best" is entirely subjective, and generally a bad idea.

I personally like Qt. There are others who like GTK+, some who prefer lesser known ones...

I suggest you take a look at the API's of each toolkit and decide which one looks easiest to use.

nerdpride
October 30th, 2008, 05:28 PM
Asking about the "best" is entirely subjective, and generally a bad idea.


You are entirely right I'll edit that

LaRoza
October 30th, 2008, 09:39 PM
See my wiki and the stickies.

QT, GTK and wxWidgets are all popular.

hessiess
October 30th, 2008, 11:10 PM
Personally my preference leans towards WX Wigits, it wraps around other frameworks(GTK, win32 etc) so the result always looks native.

Though saying that I haven't created anything more than simple tests with any GUI framework, cout/cin interfaces take less time to make and(for the most part) function adequately :).

samjh
October 30th, 2008, 11:44 PM
GTK+/GTKmm:
Very popular, fairly light-weight, written in C. For C++, you should probably use GTKmm, which is the C++ implementation of GTK+. Uses its own look-and-feel with native imitations.

Qt:
Very popular, middle-weight, written in C++. Not just a GUI toolkit, it contains comprehensive threading, networking, database, internationalisation, and other libraries in one clean package. For GUI, it uses its own look-and-feel with themes for each supported platform.

wxWidgets:
Less popular than the two above, but still quite popular. Uses native widget drawing, so it has excellent look-and-feel for each platform it supports. Written in C++. Somewhat complex and difficult to learn (IMHO).

FLTK:
Very light-weight and easy to use. On the flip-side, it look very plain (ie. not as pretty as GTK+ or Qt, and doesn't even try to imitate native look-and-feel).

There are more. But those are probably the most well-known for C++.

Envergure
January 22nd, 2009, 04:51 PM
GTK: Base of GNOME and XFCE; I don't use this one becuase it lacks a "knob" widget.

Qt: Base of KDE; Uses a patch-based messaging system rather than the usual callback-based system used in FLTK, GTK, Windows. Qt also has considerations for multithreading, OpenGL, and sound, and lots of other stuff.

FLTK: My favourite; Can be very ugly if used impropperly. Very simple to learn, lightweight, but it's hard to install the 2.0 version (Ubuntu repos have 1.1 by default). The documentation is very good. Download ZynAddSubFX to see FLTK in action.

WitchCraft
January 22nd, 2009, 05:04 PM
wxWidgets is the best, technically and legally.
However, it's not too well documented with tutorials.