GTK Vs QT (GPL vs LGPL)
Hi,
I have been programming in M$ Windows for some time now and have some experience in bsd/nix writing console apps in c++. I would like to get started with GUI programming in nix and want to choose between GTK and QT. So far what I know or believe as being advantages of the 2 platform are QT is solid C++ and GTK is solid LGPL( please don’t flame me or others for this statement). On occasion I write stuff that I can’t give out the source for (not that it is commercial) but would like to release the binaries to others. Most of this stuff that I don’t want source code released for would be written in c++ and I would probably use QT or GTK to put a GUI on it. If I were to use QT could I for instance release the GUI stuff as open source and keep the other application code as binaries or would this break the GPL. In my understanding this would be possible under GTK. And just to make it more interesting I prefer C++ so is QT or GTK (Wrapper) better for c++ in terms of speed and OO structure. Any pointers would be very helpful. Thanks. Abhay |
QT is probably the best C++ OO toolkit. That being said, GTK is very OO. It just happens to be written in C.
Just so you know, QT doesn't have to be GPL'd. You can purchase a license from QT that enables you to sell or distribute close source QT software. |
"Just so you know, QT doesn't have to be GPL'd. You can purchase a license from QT that enables you to sell or distribute close source QT software."
Thanks for your reply. Most of the stuff I write can be released as open source (GPL) so I don’t want to get into buying a licence at this stage. But the occasional application for internal use and other stuff needs to be as a binary that is why I need some flexibility |
GTK has C++ version (but with the C version it's still OO). If you want to use Qt for your apps you need to divide the GUI part (to be released under GPL) and the rest. They should be different executables, communicating by sockets, pipes, text files etc, but not linked together. It looks good on paper (monitor?), but doesn't work in real life - Qt programmers tend to use Qt everywhere: Qt lists, Qt sockets etc.
|
If you are not releasing the program outside of your organization then the GPL license will work for you. You just can't *distribute* it without making the source available upon request.
With that said; Qt apps tend to look nicer than Gtk so I'd vote for Qt! |
I suggest using wxWidgets because they do not need a daemon to load first, they use a lot less memory, and they are much faster. wxWidgets can look as pretty as KDE/QT, but it depends on the programmer's art skills. wxWidgets uses C++ code to handle the GUI. Though it could not hurt if you learn C too.
|
What daemon are you refering to? Sure ,you have to run kdeinit if you are using some of the kdelib stuff. However, there is no GTK process/daemon that has to run before you load a GTK app nor is there a qt process/daemon that has to run before you load a QT app. QT in wxWidgets are pretty similar, both are attempts to completely abstract the OS specific calls so you can easily and quickly write cross platform code. GTK/Glib provides this as well.
|
Quote:
Also, having programmed in both Qt and GTKMM (the C++ bindings) I'd say that Qt is a lot harder and uglier (code wise) than GTK. |
year 2010
date Sunday, July 04 2010 time 07:57 PM ----------------------- Hello friends , i would be glad to inform you that both GTK and QT are licensed under GNU LGPL. For further informations please follow this link .. http://en.wikipedia.org/wiki/GTK%2B And also ... http://en.wikipedia.org/wiki/Qt_%28framework%29 --------------- =========================================================== |
In Qt you have choice to select license LGPL, GPL and commercial.
|
Qt will be a better option as its library is quite complete as compared to GTK. The cross platform portability of Qt is great when compared to that of GTK.
|
As my experience is more in embedded software development, I'm a GUI newby: I've make only a dozen of GUI app with Qt, and only one with GTK++, but maybe my opinion could interest you so here's what I think about these two libraries:
-Qt is far more than a GUI library, it embeds almost every aspect software programming can need: threads, socket... And it embeds it in a source portable way. But sometime you can found strange limitation: for example, I wasn't able to send datagrams greater than 8kbytes by using the Qt socket library. In regard, GTK++ is almost only about GUI, for what I know a least. -Qt is the great winner for its documentation, the official one is just great and complete, and you can easily found plenty of resources / tutorials on the web! This is, IMHO, the greatest weakness of the GTK++ library, official reference is just not sufficient, you have to surf the web / the sources many times, and there's far less good and complete tutorials (or they're far more difficult to find). -both are very mature, active and rock solid libraries. |
When it comes to which one is easier and more pleasurable to program with, then Qt, no doubt about it!
|
All times are GMT -5. The time now is 03:38 PM. |