LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-01-2012, 06:39 AM   #1
piyush.sharma
Member
 
Registered: Jul 2012
Location: Delhi, India
Distribution: CentOS
Posts: 82

Rep: Reputation: Disabled
QT vs GTK+


Hello everyone,
I got stuck in a question, need your suggestions.
I am a C programmer but not expert yet. I wish to start learning GUI programming. I got 2 option QT & GTK+, both have pros and cons. people says the QT is the best but GTK+ is widely used, so I got confused.
For future perspective which one should I select to start?
If I select GTK because it is widely used in these days, then I found that QT was developed later than GTK, that's why GTK was used. if this is true, after a few years, we may see QT apps over GTK apps if it is really better.
Guide me what should I do?
 
Old 10-01-2012, 06:56 AM   #2
piyush.sharma
Member
 
Registered: Jul 2012
Location: Delhi, India
Distribution: CentOS
Posts: 82

Original Poster
Rep: Reputation: Disabled
One more thing I notice that the discussion I get on internet are 3 or 4 years old. Things/perceptions of those people may change in these years.
 
Old 10-01-2012, 07:17 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
people says the QT is the best
why do they say that? The point is that any statement that A is better than B has no meaning or value unless you know something about the context. All that matters to the typical user is whether something meets their specific needs.

At one time, the biggest difference between QT and GTK was in the licensing. I'm not current on this.....

Quote:
Guide me what should I do?
No-one can tell you what you should do.....
 
1 members found this post helpful.
Old 10-01-2012, 07:18 AM   #4
JohnGraham
Member
 
Registered: Oct 2009
Posts: 467

Rep: Reputation: 139Reputation: 139
I've only had limited experience with GTK+, but a fair bit with Qt. I like Qt a lot - I find it very easy to use. The GTK+ experience I've had was also good. Also, both of them are so popular that their support in the future will doubtless be very good in both cases, it's not something I'd worry about.

One thing to keep in mind is that wile GTK+ is a C library, Qt is C++. Moving to C++ is no small thing, so if you don't want to do that then I'd definitely go with GTK+.
 
1 members found this post helpful.
Old 10-01-2012, 07:30 AM   #5
piyush.sharma
Member
 
Registered: Jul 2012
Location: Delhi, India
Distribution: CentOS
Posts: 82

Original Poster
Rep: Reputation: Disabled
Thanks for your response.
Quote:
Originally Posted by pixellany View Post
At one time, the biggest difference between QT and GTK was in the licensing.
Yes it was, but now both are under GPL and can be used for commercial applications.
I am not aware of the reason using GNOME over KDE or KDE over GNOME, I started GNOME because I started Linux with ubuntu and was not aware of KDE.
QT is cross plateform and its applications can be easily used in Windows/Mac OS as well.
Note : my views are what I got from internet, personally I am new to this.
Yes, I know that no body can tell me what should I do, but can help me make a right decision, the only thing I need from you.
 
Old 10-01-2012, 07:31 AM   #6
pmvstrm
LQ Newbie
 
Registered: Sep 2012
Posts: 17

Rep: Reputation: Disabled
I worked with both.

If you really an C AND not thadt much and C++ Programmer, then you should absolutly go for GTK.
GTK is in its core a C ony Framework, but it has of cause nice bindings to C++, Python ect wich
works very nice. On the other side QT is C++ only and strictly OOP based Programming. C Knowlege
alone doesnt help you anything at here. Mainly i noticed thadt all Major Linux Distributions
are focused on GTK Style GUI Programms.For example: Ubtuntu will not distribute your Software
over the Software Installer Tool if it is not GTK. I switched from QT to GTK and i never
missed anything. Of cause, AT has some builtin candy, but in the Gnu and GLibspace you can
find also some candy.

Thadts my 2 cents.
 
Old 10-01-2012, 07:39 AM   #7
piyush.sharma
Member
 
Registered: Jul 2012
Location: Delhi, India
Distribution: CentOS
Posts: 82

Original Poster
Rep: Reputation: Disabled
JohnGraham : Thanks
you started QT just because it was easy to use or you were familier to C++? Yes, I am a C programmer and would like to go with GTK+, But I am also aware of C++, what you say now?
 
Old 10-01-2012, 07:46 AM   #8
piyush.sharma
Member
 
Registered: Jul 2012
Location: Delhi, India
Distribution: CentOS
Posts: 82

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pmvstrm View Post
I worked with both.
In terms of dependency, Will both application work on any Linux Distribution or environment or there will be a list of dependencies? I also read that Applications in GTK+ were lighter and faster than QT so mini OS deal in GTK+. Is it true?
 
Old 10-01-2012, 09:30 AM   #9
JohnGraham
Member
 
Registered: Oct 2009
Posts: 467

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by piyush.sharma View Post
you started QT just because it was easy to use or you were familier to C++?
No, the choice of Qt was forced upon me by my work (not that I had any objections; it's still a nice framework).
 
Old 10-01-2012, 03:54 PM   #10
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by pmvstrm View Post
Mainly i noticed thadt all Major Linux Distributions
are focused on GTK Style GUI Programms.
Really? No "major Linux distribution" uses KDE as a default desktop?

Last edited by dugan; 10-01-2012 at 04:00 PM.
 
Old 10-01-2012, 07:58 PM   #11
amboxer21
Member
 
Registered: Mar 2012
Location: New Jersey
Distribution: Gentoo
Posts: 291

Rep: Reputation: Disabled
If your a C programmer use GTK!
 
Old 10-02-2012, 11:25 PM   #12
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by piyush.sharma View Post
I wish to start learning GUI programming. I got 2 option QT & GTK+
Also, find out what does your local "market" prefer.
Do companies prefer Qt over GTK for jobs or vice-versa, in your area?
Check out the job sites for the same, if earning money through the
technical skills is one of your aim.
 
Old 10-04-2012, 03:00 AM   #13
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
Why don't you try them both and make up your own mind?
 
Old 10-10-2012, 05:35 AM   #14
pmvstrm
LQ Newbie
 
Registered: Sep 2012
Posts: 17

Rep: Reputation: Disabled
Quote:
Originally Posted by piyush.sharma View Post
In terms of dependency, Will both application work on any Linux Distribution or environment or there will be a list of dependencies? I also read that Applications in GTK+ were lighter and faster than QT so mini OS deal in GTK+. Is it true?
For easy to use and develop, QT is faster to develop but not easy to deploy on any Platforms.I have used it in Linux/FreeBSD/Solaris/Mac and Windows. The main Problem with QT i was allways running is, it is a massive, monolitic block and it takes hours to compile and for diffrent Distro and 32/64 Scenarios you need some diffrent Versions. Also you cannot really mix statically with dynamic, late bindings.With GTK2.20 otherwise i was able to target all my Platforms, regardles if 32 or 64 Bit. Of cause there where Problems. I also noticed thadt some QT Features like scripting or the HTML or Networking module could not be builded on some Platforms.

Thadts the technical side, but there is also an business side. If you want closed source or opensource and
commercial (licensing or whatever) you have to pay a full commercial license to Digia Inc, wich is now the
Owner. QT has changed its owner in the last to years and every new Owner can change the licensing terms
very quickly.GTK is OpenSource and will every be free and cannot be buyit by some Badass company. Thadts
for me one reason to focus on GTK if i need GUI Features for my Programs.
 
1 members found this post helpful.
Old 10-10-2012, 05:42 AM   #15
piyush.sharma
Member
 
Registered: Jul 2012
Location: Delhi, India
Distribution: CentOS
Posts: 82

Original Poster
Rep: Reputation: Disabled
Thanks, it is a nice description. I will use GTK+ for my application.
 
  


Reply

Tags
gtk+, qt



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
Inhibit GTK verbose messages when running GTK/Gnome applications from terminal d1s4st3r Linux - Software 1 11-10-2009 10:33 PM
gtk-qt-engine causes white border on gtk tray icons tdtooke Linux - Desktop 0 08-08-2008 12:25 PM
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
GTK source install doesn't give gtk-config Feebles Linux - Software 4 06-15-2005 12:51 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:20 PM.

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