View Full Version : [SOLVED] How to make GUIs in c++

March 6th, 2012, 05:35 AM
Is it even possible? Any informative things I should be reading? Or am I barking up the wrong tree?

March 6th, 2012, 05:38 AM
I haven't actually used them for a programming project, but GTk and Qt seem to be popular.

March 6th, 2012, 06:24 AM
Thank you, I'll look into them, anything else? Any and all help is appreciated.

edit: Oh wow, GUIs are a whole other thing, lol, nothing I can't learn.

March 6th, 2012, 07:31 AM
Yes it's possible.

Programming GUIs in C or C++ is platform dependent. You need to decide which API win32(windows) GTK+(Gnome, framework available for Windows) Qt(framework available for all 3 OSes).

The Qt would probably be your best bet. There are numerous IDEs out there.

March 6th, 2012, 07:36 AM
My recommendation is FLTK, it's a fairly easy to use small library for C++. QT could be a good one, I've not used it, but it is much larger than FLTK.

March 6th, 2012, 09:08 AM
Apart from the suggestions above, I'd suggest the Zetcode tutorials as a resource to see what's possible and try out a few simple examples:


For C++, the cross-platform ones to look at are:


You can use GTK with C++ but if you want to write GTK-based applications (which integrate best with Gnome), consider gtkmm3 as the official C++ binding for GTK3:


If you are going down the GTK route, be aware that there is the difference between GTK2 and GTK3. You should really be looking at GTK3 for new applications and gtkmm3 supports that.

March 6th, 2012, 05:37 PM
Muahaha, Thank you for all the help, I think that'll be enough for me to choose a platform for making my GUI, I'll try a little bit of everything, se what works best. THANK YOU SO MUCH.

March 7th, 2012, 12:48 AM
QT and GTK are good for programs with buttons/menus and applications. If you want to make something simple like a small game with a few moving pictures, then SDL would be easier. I don't know how cross platform is SDL.

March 7th, 2012, 12:56 AM
If you choose to try FLTK as suggested earlier , there is a directory in the package named "examples" which has templates of various functions which are useful for getting you started as you can use them and just modify each part as you become more proficient with the commands.

Hope this helps you

March 8th, 2012, 01:21 AM
No, I'm not trying to make a small game, it's more of a gag, here in mexico we there's this little person named "Margarito", and because of this Pic: http://quetemetes.net16.net/wp-content/uploads/2012/01/medicion-en-margaritos.jpg I decided to make a converter, it converts only meters, for now, to "Margaritos" (85cm), but I want to make a nice GUI to go with it, and try to incorporate more than just meters.