Linux GUI Programming

Hiya there. I know some stuff about the Windows32 API, and that it's the way to make GUI's on Windows. The good thing is that I'm not interested in Windows development as a main thing, rather just to port Linux applications to Windows/Mac. I have heard of two main GUI libraries - QT and GTK+. I'd like to know which one is better, which one is easier to learn, and which one you'd advice me to learn first. A link to a good tutorial would be appreciative too.
neither try sfml
At least I got a response, but could you link to a good tutorial for it? And please specify, does it work for Linux and Windows? MacOSX is a plus, but not at all necessary.
Between QT and GTK+ is only few real differences.
1) License, you cann't use QT for commercial work for free. You mast pay to Nokia. But if your programs are free use as much as you want.
2) Here are a lot of books about QT, but here aren't a lot of books about GTK+.

If you want to use GTK+ with C++ you will need to use GTKmm library for it http://developer.gnome.org/gtkmm-tutorial/stable/
I used a little bit of QT a while ago. The API seemed almost as odd as the Windows32 one, and don't users need QT installed to use it?

Hm, I was hoping to be able to make a little bit of money down the road, and if I had to pay, I probably wouldn't make very much money. Can you link to good tutorials for GTK+?
closed account (o3hC5Di1)
Shinigami wrote:
1) License, you cann't use QT for commercial work for free. You mast pay to Nokia. But if your programs are free use as much as you want.


This is not true.
QT has a commercial license AND a LGPL license product.
The LGPL license basically means that you can use QT in your commercial product, but you cannot say you wrote it, modify it, you have to dynamically link to it and you have to provide a copy of the LGPL licence along with it.

In practice this means you can perfectly well use it in commercial products, if you respect certain conditions within the LGPL.

If you google "QT vs GTK+" you will get quite a few comparisons.
Most seem to favour QT and now that it's been taken over by Digia hopes are that it will be ported to iOS (iphone / ipad) soon, making it the most supported cross platform framework.

Hope that helps.

All the best,
NwN

http://qt-project.org/forums/viewthread/6749
http://stackoverflow.com/a/7698580
http://fossbazaar.org/content/why-would-you-buy-commercial-qt-license-when-its-lgpl
Last edited on
sfml works on all os' cause its a grahics library just go to sfml.com
Hmmm I thought LGPL is only for free products. As I saw this http://www.digia.com/en/Qt/Try-Qt-Now/
If you have already evaluated Qt Commercial and would like to get started developing with a full Qt Commercial version, please contact our sales team.

But now I found this http://qt-project.org/forums/viewthread/9762

Can you link to good tutorials for GTK+?

If you use C++ I already given the best tutorial I found on internet.
Last edited on
Thanks for the link. I'll use it and the GTK documentation to learn the API and how to use it as well.

Since QT is going to be ported, it maybe worth learning it as well.
Now, QT and GTK+ can be used with OpenGL, right?
Not an expert here but you might consider wxwidgets. As far as I know it is a portable (platform independent) toolkit that uses QT or GTK+ to implement things on the lower level. Or you might try JavaFX, I heard it is a replacement for the old Swing. Both are high level and object oriented thus easy to use and maintain.
Is it really possible to make GUI in WIn32 API? It sounds rather uncomfortable.
It seems that nobody said about wxWidgets, which is a very powerful cross-platform toolkit:
http://www.wxwidgets.org/

It is my favourite toolkit because it creates much smaller executables compared with Qt (it also compiles very fast, if you ever want to compile Qt from sources it takes hours, multiply this with every debug - release combination) and it has very populated forums and extensive documentation.
Thanks for all the information.
Slazer, I'm not interested in Java at all. I'll learn it when I have to take AP Computer Programming. :) Yes it is possible to make a GUI with Win32 API. A lot of people do it. And being able to do it shows something about the programmer.
It means they are a bad programmer.

Modoran, I'll look into wxwidgets. Is it possible to mix wxwidgets, QT, and GTK+ all together? I'm the least interested in QT, having tried using a little bit of it a long time ago, but having the option would be nice.
I think you want to do GUI creation ? Right ?

In C++ so are you planning it cross platform too ?
For crossplatform GUI creation best options are

Juce(preffered) - http://www.rawmaterialsoftware.com/juce.php/
Qt(Most used) - http://qt.nokia.com/products/
WxWidget - http://www.wxwidgets.org/

I know there are lots GUI creation APIs available for C++, But i have tried to keep it low and best used in industries. Hope it will help you.
Modoran, I'll look into wxwidgets. Is it possible to mix wxwidgets, QT, and GTK+ all together? I'm the least interested in QT, having tried using a little bit of it a long time ago, but having the option would be nice.


It should be possible (I never tried), but it could have issues even if it works, like very huge depedencies which must be present at runtime.
Never heard of Juce, but I've seen and heard of GTK+, QT, and wxWidgets and even have QT installed under Ubuntu and use GTK+ themes for Ubuntu.
For GTK+ there is Glade, a GUI designer.
For Qt there is Qt-designer.
They generate C code but I remember having read they also have C++ support. Never used any of them though.
Last edited on
@BHXSpecter

Hamm yeah, because Juce is not that much advertising and kind a new too.
But It is really good , believe me, It's very simple to use, based on inheritance and very powerful toolkit to build GUI for audio video kind of things....
@acn

I'll give it a try, I'm not big on knocking something til I at least try it first :).
Topic archived. No new replies allowed.