re: QT vs GTK 2006



On Mon, 2006-03-06 at 08:08 -0800, andrew openldev org wrote:
> > 1. Is the win32 version of GTK really that unstable? It's homepage still
> > (as of today) contain a rather scary warning sign.
> 
> It all depends on what you're trying to do. If it is a very involved application,
> you may run into some basic problems. The worst part is getting it installed, but
> that has become easy in recent days. Just make sure to package a compiled
> version of Gtk+ with your application as well.

I consider GKT+ on Windows to be as stable and almost as feature-
complete as GTK on Linux.  GTK on Mac, however, is lacking in
integration with the OS (requires X11, for example), but is just as
stable as on Linux.

> 
> > 2. Name some successful (in terms of many users, well-known) GTK-based
> > projects outside of the GNOME sphere? For instance QT has Opera and Adobe
> > Elements, in heavy use, outside of KDE.
> 
> Gaim has a big following. Firefox & Thunderbird use Gtk+ on Linux. I also believe
> you can use Gimp on Windows using Gtk+ as well.

I think Gaim and Gimp are huge ones.  I know they have large numbers of
windows users.  Many folks still complain about gimp's interface about
how it's not quite native.  That's mainly because of the UI design of
the Gimp, though.  In my experience, GTK+ with the WIMP theme (default
on windows) provides an app that many folks can't tell apart from apps
written with MFC and Win32 gui apis.  As you know, GTK doesn't use any
windows controls but draws everything itself.  QT does the same thing,
but in my experience QT manages to look and act like normal win32
controls a little better than GTK.  On MacOS Qt also looks and acts like
any other Mac app, although QT apps are by nature Carbon apps and the QT
widget theme is very close to the standard Cocoa look and feel, but off
in a few places.

> 
> > 3. I guess there is a whole lot of people on list this that are using
> > multiple toolkits, but for those who prefer GTK over other toolkits: What
> > are your personal motivations for using GTK instead of something else?
> 
> I tried Qt, but found it to be very clunky (my opinion of course). Gtk+ is very
> straight forward and to the point. Its functions are highly descriptive, so
> anyone looking at the code can figure out what is going on without much
> effort. Its consistency also makes remembering its wide array of functions
> a breeze.

I agree.  First and foremost GTK+'s layout system is way easier to use
than QT's.  I never have quite got the hang of doing proper layouts in
QtDesigner, but in Glade with GTK it's a snap to get UI's that look good
and dynamically adjust to window sizes.  Anything that forces you into a
static widget layout (ahem win32 and MFC) is not a good idea.

I also prefer GTK+ because it is written in straight C yet has a very
good object-oriented design that translates very well into bindings for
other languages including C++, Python, Perl, and others.  QT also has
bindings for these languages but they are wrappers around a bunch of C
thunks (Qt-C) around the original C++.  Also, Qt requires a special
preprocessor to handle things like signals and slots.  Whereas the C++
bindings of GTK+ need no such processing to accomplish the same thing in
a manner that's actually more flexible.

> 
> Also, with Gtk+ come GLib, which is a tool that I find indespensible because
> it brings so much funtionality to the table without the need to program a ton
> of lines of code.

Agreed.  Glib alone should be made a part of the standard C library.
Even if you don't want to use the even loop, the utility functions are
indispensible if you are using C. 

There's even work going on to patch Qt to actually run on top of glib,
inheriting the glib event dispatcher (which is much more generic and
useful than Qt's).  The upshot of that is that soon you'll be able to
use both Qt and GTK in the same application.

> 
> > 4. There have been a lot of talk about OpenGL, composition engines and
> > that kind of stuff lately. Is there are key difference between QT and GTK
> > that's relevant in this context? I mean, is any of these toolkits better
> > positioned to adopt to these changes (both upcoming 3D widgets and taking
> > advantage of hardware caps to boost 2D performance) or is this more of an
> > X issue rather than a toolkit issue?
> 
> That's not really an issue I know much about ... sorry.

This kind of thing is really intended to be underneath of GTK.  So Gtk
apps (and Qt) need not concern themselves with it at all.  GTK and Qt
are both being adapted to use vector-based drawing APIs under the hood,
but this need not be worried about at the application level.

> 
> > 5. If you where to start a cross-platform project today, with no prior
> > knowledge of any toolkits or languages. In order to maximize code
> > readability, programmer productivity and all that good stuff; what would
> > you choose? QT or GTK or maybe Java or .NET?
> 
> This would actually come down to two choices. I wouldn't use Qt because
> of licensing issues and other issues stated above. Java is extremely slow,
> so that wouldn't be an option for me.  Gtk+ is obviously viable and would be
> my first choice. But, I would also recommend you looking into Mono. While I
> haven't ever used it myself, I have heard many good things about it.

I'd give serious consideration to Qt, despite its shortcomings.  It has
the best support on the most platforms.  The primary language is C++ but
there are bindings for C#, python, etc.

GTK is definitely a serious contender.

Java is not extremely slow.  I use eclipse quite a bit and it's very
speedy (uses a GTK interface in Linux).

> 
> > 6. Does GTK support per-application skins/themes?
> 
> That all depends on what you mean by skins/themes. If you want to do
> something where you hide the taskbar & then use GtkImage(s) to create
> the gui, then yes. If you want to change the theme a particular application
> is using, then I believe it can be done, but it is not encouraged.

I agree.

Michael

> 
> I have heard multiple places that the functions to do this were not included
> in Gtk+ because they want to application developers to respect the theme
> preferences of the user. With that said, of course there is a way; it just may
> not be easy.
> 
> I hope this helps you!
> 
> ---
> Andrew Krause
> andrew openldev org
> www.openldev.org 
> 
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]