View Full Version : Resolved C++ GUIs
ShaneC
10-09-2009, 03:23 AM
Hey all,
I'd like to expand my programming horizons a bit in my free time and I figured the next good step is learning C++ GUIs as I already commonly make them in Java as it is.
My question to you all is, before learning, which framework should I use? From researching a bit and looking it up the best way to do GUIs are by using pre-existing frameworks. Is this true? Or is it better to make a GUI by scratch?
I'm pretty versed in C++ as it is but I've never needed to make anything more than a console app so any materials, advice, or suggestions you have would be super helpful.
Thanks!
PS: I'm sorry if this has already been posted. I tried to do a search but the site finds "GUI C++" an unacceptable length :(
cs_student
10-09-2009, 04:06 AM
I suggest you use a GUI framework.
Check out this (http://en.wikipedia.org/wiki/List_of_widget_toolkits#Based_on_C_or_C.2B.2B_.28including_bindings_to_other_languages.29) wikipedia page for a better description of gui frameworks/toolkits than anybody here can give you.
The most popular ones are GTK+ (C based, used in gnome), and QT(C++ based, used in KDE). wxWidgets is also a notable one.
I hear QT has a resemblance to the java swing api.
I haven't tried either of them, so I can't give you a personal opinion.
cs_student
oracleguy
10-09-2009, 04:38 AM
PS: I'm sorry if this has already been posted. I tried to do a search but the site finds "GUI C++" an unacceptable length :(
That's because your search terms have to be longer than 3 characters, on a site like this, 3 character or less terms show up a lot, that's why there is the restriction.
As for your question, you can use a framework, the main advantage to using a framework is that it allows your program to be cross platform. If you write your GUI using the native API for the platform you are on, say Windows, you can't cross compile your program for Linux.
But with a framework, since you are using their API, as long as they've written a version of their framework for the platform you want to use, you don't need to modify your program very much.
I've used wxWidgets a lot myself, it is pretty straightforward and they have excellent documentation and tons of a sample programs. But I have also written GUIs using the native Win32 API before. It can be advantageous to at least play around with the native API because you will get a deeper understanding on how GUIs are implemented in an operating system.
ShaneC
10-10-2009, 08:37 PM
Both very helpful posts. I'll look into all them though it looks like the consensus appears to be wxWidgets. I've also got a friend who is pretty well versed in wxWidgets so that is probably the way to go.
Again, thank you both very much!
Spookster
10-11-2009, 07:43 PM
We use Qt4.4 here at work for all of our GUI development. The latest Qt4.6 that's coming out really takes GUI capabilities to the next level.
ShaneC
10-11-2009, 07:46 PM
We use Qt4.4 here at work for all of our GUI development. The latest Qt4.6 that's coming out really takes GUI capabilities to the next level.
Looking at the documentation it does look pretty versatile. I've already started doing some work with wxWidgets but I will look into Qt as well.
Thanks!
After looking more into the programs done with QT vs with wxWidgets I actually think I'm going to go the QT route!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.