Best GUI for learning C++ in Ubuntu Linux

Sep 26, 2012 at 6:37pm
Hi Guys,

I am a programming newbie taking a C++ course at my local college. I am interested in what the best GUI package is for building GUI's in Linux. Ideally, I'd like to learn something that is fairly straight-forward and portable to Windows/Mac. Not sure this exists!!! Maybe I am such a newbie that I am asking for the impossible. I use Ubuntu 12.04 with LXDE, Unity, and KDE depending on the machine and my mood. I simply want to be able to make GUI fronts for console apps I've built.

Any good pointers to the right library (GTK, QT, etc.) and any good tutorials or videos would be appreciated. Thanks for your time.
Sep 27, 2012 at 1:16pm
Clutter looks very promising to me, although i did not have the time yet to create some gui's with it so unfortunately i can not tell you much about it, if it's good or bad or something. Maybe you just want to try it out: https://clutter-project.org/

Edit: Hm just read that you're a newbie in c++, so i guess clutter won't be a good thing for you since you can't just drag n drop buttons etc. (i guess that is what you are searching for) :/
Last edited on Sep 27, 2012 at 1:19pm
Sep 29, 2012 at 2:17am
I believe you mean IDE? GUI is graphic user interface which I guess could be construed to mean the same as integrated development environment.

Personally you could just use Kate which has a C++ coding setting. It will highlight your code and show loops and function blocks. However you could get all fancy and run with Eclipse or CodeBlocks.

Sep 29, 2012 at 8:23pm
No, he didn't mean IDE.

I haven't programmed in any GUI's (well, other than what I was forced to use in my VB classes) so I can't say, but if I did program in a GUI the first one I would try is QT.
Sep 29, 2012 at 8:56pm
I started with FLTK which has a short learning curve, you can get an application up very quickly.

Everyone says Qt but it has this macro thing where you must insert weird Qt stuff in your code and then put it through moc before compiling. It just seems to be complicated - there may be good reasons why they do this but I don't know them.
Sep 29, 2012 at 9:35pm
FLTK's website is so ugly though, I don't mind simplistic, it doesn't have to be beautiful, but that is just ugly.
Sep 30, 2012 at 3:49pm
Clutter looks very promising to me, although i did not have the time yet to create some gui's with it so unfortunately i can not tell you much about it, if it's good or bad or something. Maybe you just want to try it out: https://clutter-project.org/

Edit: Hm just read that you're a newbie in c++, so i guess clutter won't be a good thing for you since you can't just drag n drop buttons etc. (i guess that is what you are searching for) :/


I love clutter. If you want a fully custom GUI rendered with openGL, it's a great library to use. It's pretty easy to use as well; although it does not have widgets, you can use it with GTK+ if you want.

Clutter is event based; it has it's own main loop which runs in the background. This makes it not a great lib for game development, but much more convenient for dynamic GUI development.

All in all, clutter is very simple to use. You make "actors" from images, or just shapes. You have functionality to easily set their opacity, position, rotation, connect events to function calls, drag and drop, scroll, etc.

You also can use a function called clutter_threads_add_timeout, which will launch a specified function at a specified interval in milliseconds. It can function as a non-high-accuracy critical game loop. I've actually successfully used it to make a fast paced 2D jet fighter game with success. Although I wasn't able to get a very high frame rate.

Clutter would be perfect for something like a board game, or card game or something like that.

You also can use cairo in a clutter app for high quality drawing. I've used it to implement a signal level meter and a spectral analyzer. There is an example of making an analog styled clock in the documentation as well.

The only thing I don't like about clutter is that in windows you need to have like 20 or something dll's in the same folder as your executable. It has a whole bunch of dependencies making it less portable than some other libs. It will however work fine on Windows, OS X and linux.
Last edited on Sep 30, 2012 at 7:28pm
Oct 1, 2012 at 6:14pm
Thanks Guys. To clear up the confusion, I am NOT looking for an IDE; I use Kate, Scite, and mostly just gedit to fill my coding text editor needs. Someday I'll learn VI or emacs. I really want to make GUI's. Thanks for the tips I'll check them out :)
Oct 4, 2012 at 4:57pm
I use Qt with windows, but it's completely portable between Windows and Linux. I've tried a few methods to create GUIs: SFML, pure-Win32, MFC and Qt. Qt has given me simplest AND most powerful solution to creating GUIs. I started with simple ones in all of the above wrappers, but only with Qt have I been able to make complicated GUIs easily. I completely recommend it.
Oct 5, 2012 at 3:39am

mik2718 wrote:
Everyone says Qt but it has this macro thing where you must insert weird Qt stuff in your code and then put it through moc before compiling. It just seems to be complicated - there may be good reasons why they do this but I don't know them.


IF you use QtCreator IDE along with qmake, it does all this stuff automatically.

Here is some documentation.

http://qt-project.org/doc/qt-4.8/moc.html


I agree with Stewbond entirely.
Topic archived. No new replies allowed.