# want to learn GUI stuffs



## nims11 (Apr 6, 2011)

i want to learn about any GUI library which i can use to give GUI to my C/C++ programs. I don't want to go advanced and i will be happy with implementing simple GUIs. also i would prefer a library that i can use with other languages too as i will be learning java or python later this summer. also i want a library which works with both windows and Linux.

only library i know about is GTK. i have also heard it be used under windows. what are you opinions about it?


----------



## coolpcguy (Apr 6, 2011)

> i want to learn about any GUI library which i can use to give GUI to my C/C++ programs.


Look at Qt. Qt has bindings for most languages - including Python ( via PyQt  - not sure about Java).


----------



## Garbage (Apr 6, 2011)

I think GTK and QT are the best options you have.

GTK+ - About
Qt - Cross-platform application and UI framework &mdash; Qt - A cross-platform application and UI framework

For Java, you will have to learn Swing (which I find quite ugly).
Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials)


----------



## mohityadavx (Apr 6, 2011)

though not a library u can use Visual Basic its easy and fast to learn


----------



## nims11 (Apr 6, 2011)

Garbage said:


> I think GTK and QT are the best options you have.
> 
> GTK+ - About
> Qt - Cross-platform application and UI framework &mdash; Qt - A cross-platform application and UI framework
> ...



according to it GTK can be used with JAVA, GTK+ - Language Bindings


----------



## Garbage (Apr 6, 2011)

mohityadavx said:


> though not a library u can use Visual Basic its easy and fast to learn



Visual Basic doesn't run on Linux. Does it?


----------



## Liverpool_fan (Apr 6, 2011)

Well for C++, you have choice of Gtkmm, Qt, wxwidgets, among many others. While GUI Programming isn't exactly in my domain, but I can recommend you a useful link to get you started - ZetCode, tutorials for programmers


----------



## nims11 (Apr 7, 2011)

thanks to all! @liverpool_fan the link you gave is very useful
GTK+ seems good to me and it looks easy to learn. i will start with the basics of both GTK and QT and then decide which one should i go forward with.


----------



## mohityadavx (Apr 7, 2011)

Garbage said:


> Visual Basic doesn't run on Linux. Does it?



Wine maybe of some help


----------



## coolpcguy (Apr 7, 2011)

> Wine maybe of some help



Mono, if you're talking about VB.net


----------



## Liverpool_fan (Apr 7, 2011)

mohityadavx said:


> Wine maybe of some help



Mate he wants to target BOTH Linux and Windows, and you are suggesting him an outdated and crappy Visual Basic and then going on with "Linux users can run it in WINE", that's a pretty awful advice to say to least. No offence.


----------



## gk2k (Apr 7, 2011)

@nims11: I suggest you use Qt. The main advantage is it is Object Oriented. It will help you grasp OO concepts better. You can start with Qt creator-it is a easy drag and drop way to create widgets.


----------



## abhijangda (Apr 8, 2011)

Qt is the best, I have programmed many apps in  PyQt4 and Python. Currently, I am learning GTK+ in C. That's also good. QtJambi is Java bindings for Qt. GTK+ is also available for Java, known as java-gnome. 
With Qt you can program GUIs in C++/Python/Java/C#/Visual Basic/Ruby etc. Qt is not available for C. GTK+ is available for C and for others too. 
Another competitor is wxWidgets, it is good too. It is also available for C++/Python etc. but not for C.
These three are closest competitor. 
One thing you should note is
Prefer GTK+ if you are to do only Linux Programming. wxWidgets if you are to do only Windows programming. And Qt is for both. Although all these three are cross-platform, but still I would recommend that because GTK+ has created for Linux, wxWidgets for Windows and Qt came when Linux has just stepped in. 
I would recommend Qt if you want to concentrate in C++/Python/Java and GTK+ if you want to concentrate in C. 
Qt is not a widget toolkit but its a full framework. Each of them has its own advantage and disadvantage. But I think Qt wins.


----------



## nims11 (Apr 8, 2011)

^^ seeing you after a gap! nyways thanks for the reply!
i went through the first 2-3 sections of the both qt and GTK+ tutorial from the link liverpool_fan posted. both seemed good and i was quite confused with what shall i proceed with. i browsed about both qt and GTK for support, tools, documentation and stuffs lyk that and my inclination started shifting from GTK+ to Qt and after reading the last two comments, i think i will be going forward with Qt!


----------



## abhijangda (Apr 9, 2011)

nims11 said:


> ^^ seeing you after a gap! nyways thanks for the reply!
> i went through the first 2-3 sections of the both qt and GTK+ tutorial from the link liverpool_fan posted. both seemed good and i was quite confused with what shall i proceed with. i browsed about both qt and GTK for support, tools, documentation and stuffs lyk that and my inclination started shifting from GTK+ to Qt and after reading the last two comments, i think i will be going forward with Qt!



Yeah, I was quite busy for some time. 
Do not try to learn 2 toolkits at same time, it will leads to confusion only. If you think you should do Qt then go with it. But one thing you should remember is that GUI programming heavily depends on Object Oriented programming, so your OOP should be strong. 
Also for beginners there are very good tutorials on *zetcode.com.
Good Luck!!


----------

