LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-18-2005, 02:24 PM   #1
bt_2004_bt
LQ Newbie
 
Registered: Mar 2005
Distribution: FreeBSD
Posts: 3

Rep: Reputation: 0
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
 
Old 03-18-2005, 02:27 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
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.
 
Old 03-18-2005, 02:34 PM   #3
bt_2004_bt
LQ Newbie
 
Registered: Mar 2005
Distribution: FreeBSD
Posts: 3

Original Poster
Rep: Reputation: 0
"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
 
Old 03-18-2005, 04:36 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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.
 
Old 03-18-2005, 04:37 PM   #5
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
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!
 
1 members found this post helpful.
Old 03-19-2005, 01:06 AM   #6
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 03-19-2005, 08:19 AM   #7
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
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.
 
Old 03-19-2005, 08:59 AM   #8
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by KimVette
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!
You think? I think Qt looks hideous on the whole and GTK themes look a whole lot nicer.

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.
 
Old 07-04-2010, 09:40 AM   #9
krishnasut
LQ Newbie
 
Registered: Jan 2009
Posts: 14

Rep: Reputation: 0
Talking

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

---------------

===========================================================
 
Old 07-05-2010, 12:50 AM   #10
pielas
Member
 
Registered: Jan 2009
Location: Poland
Distribution: Arch Linux
Posts: 50

Rep: Reputation: 17
In Qt you have choice to select license LGPL, GPL and commercial.
 
Old 07-05-2010, 03:42 AM   #11
ravi.xolve
Member
 
Registered: Jul 2006
Posts: 89

Rep: Reputation: 15
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.
 
Old 07-05-2010, 11:01 AM   #12
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
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.
 
Old 07-05-2010, 11:57 AM   #13
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
When it comes to which one is easier and more pleasurable to program with, then Qt, no doubt about it!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Freerock uninstall stole GTK looking for up-to-date pango, atk, gtk, glib and xft tgz Oholiab Slackware 8 09-18-2005 11:57 AM
The LGPL juanbobo Linux - General 1 09-10-2005 12:46 AM
GTK Vs QT (GPL vs LGPL) bt_2004_bt Linux - Newbie 3 03-18-2005 04:31 PM
Diffrence between LGPL and GPL? worldmagic Programming 3 07-01-2004 08:24 AM
GPL, LGPL, other Licences Blaze1st Linux - Newbie 11 01-21-2003 12:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration