ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Fedora Core, and Gentoo eventually, but i hate (XKEU)buntu
Posts: 48
Rep:
Programming GUI
So here is the important question. I am planning on learning to programm GUI stuff. I program in c++(is the only language that i understand) and want to create something cross platform. I hope to eventually integrate opengl and openal into my projects. To this date i have only really done console programming and limited window api programming(what a nightmare). For an ide i use codeblocks in both windows and linux with the gcc compiler. If needed i can probably change ide. So my question is what do i learn. Do i learn Qt, wxWidgets, GTK+, or some other one that i havent heard of before.
You won't need to change the IDE. IDEs simply do nothing more than provide nice, little shortcuts/features and a means of keeping your code organized.
Here's a quick summary of those graphical libs you listed:
- Qt is the base of KDE-based GUI applications.
- wxWidgets is meant to be a cross-platform set of GUI libraries (similar to the Java AWT and Swing packages).
- GTK+ and GTK+2 (Gimp Tool Kit) are used for programming GUIs under the GNOME desktop. GTK+ programming is actually oriented in C, not C++. Yes, there are bindings to other languages (most notably Python), but C is the home-language of GTK+.
If you're doing cross-platform programming, I would suggest wxWidgets.
Distribution: Fedora Core, and Gentoo eventually, but i hate (XKEU)buntu
Posts: 48
Original Poster
Rep:
Thanks for your suggestion. But isnt QT crossplatform aswell. I may be wrong. What advantages does wx hold over qt ignoring the crossplatform issues. I have read up on each of these, and they both seem to be equally valid ways to program interfaces.
I would say use GTK+ just because its easy to learn quickly and easy to install in a windows environment. wxwidgets is a bit of an exotic thing at this point but not out of the question. There are however more programs in GTK that would be good for examples when your learning. Ive never been a fan of QT though I do like KDE this might be from the nightmares that Ive had trying to compile it from source. Im not sure about qt in a windows environment either not sure how easy or difficult that can be but I would imagine its just as easy as GTK. Also GTK is free to use for business purposes while Qt is not so you may need to consider licensing restrictions.
Qt Open Source can be used in business as well, but the applications must be in one of the Open Source licenses.
I've tried all of them, wxWidgets, GTK+ and Qt. And I've went for Qt. It is cross platform yes, for me it was the most simplest of them all. And I find Qt docs very helpful. Before Linux programing I've done MFC C++ programing in the academy, comparing it to Qt in all ways, even the documentations in my house Qt wins 10 to 1.
Qt isn't that hard to learn, and you also have GREAT docs with it witch explain everything, function by function, and provided with some examples it's the best thing.
Distribution: Fedora Core, and Gentoo eventually, but i hate (XKEU)buntu
Posts: 48
Original Poster
Rep:
I must thank you all for our input. I think i will go with QT. After hearing your suggestions and looking at source code qt seems to be the easiest to work with. wxWidgets reminded me too much of windows programming.(maybe its just me) It works well, but the structure doesnt make much sense to me. But i will consider using it in the future. I am sure that it has some features that qt doesnt have. As far as GTK+ i looked a little more into that and it just doesnt seem as flexible as the others to me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.