LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   QT vs GTK+ (http://www.linuxquestions.org/questions/programming-9/qt-vs-gtk-4175429859/)

piyush.sharma 10-01-2012 06:39 AM

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?

piyush.sharma 10-01-2012 06:56 AM

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.

pixellany 10-01-2012 07:17 AM

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.....

JohnGraham 10-01-2012 07:18 AM

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+.

piyush.sharma 10-01-2012 07:30 AM

Thanks for your response.
Quote:

Originally Posted by pixellany (Post 4793917)
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.

pmvstrm 10-01-2012 07:31 AM

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.

piyush.sharma 10-01-2012 07:39 AM

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?

piyush.sharma 10-01-2012 07:46 AM

Quote:

Originally Posted by pmvstrm (Post 4793928)
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?

JohnGraham 10-01-2012 09:30 AM

Quote:

Originally Posted by piyush.sharma (Post 4793935)
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).

dugan 10-01-2012 03:54 PM

Quote:

Originally Posted by pmvstrm (Post 4793928)
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?

amboxer21 10-01-2012 07:58 PM

If your a C programmer use GTK!

TheIndependentAquarius 10-02-2012 11:25 PM

Quote:

Originally Posted by piyush.sharma (Post 4793885)
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.

bigearsbilly 10-04-2012 03:00 AM

Why don't you try them both and make up your own mind?

pmvstrm 10-10-2012 05:35 AM

Quote:

Originally Posted by piyush.sharma (Post 4793943)
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.

piyush.sharma 10-10-2012 05:42 AM

Thanks, it is a nice description. I will use GTK+ for my application.


All times are GMT -5. The time now is 01:49 PM.