Re: [gtk-list] KDE Gnome Qt gtk--
- From: Jay Painter <jpaint serv net>
- To: gtk-list redhat com
- cc: gnome nuclecu unam mx, kde-request fiwi02 wiwi uni-tuebingen de
- Subject: Re: [gtk-list] KDE Gnome Qt gtk--
- Date: Fri, 16 Jan 1998 15:03:55 -0800 (PST)
> 3. Qt is the best available graphical Toolkit
I've programmed with Qt, and I develop for GTK. Although this statment
was true 6 months ago, it's becomming less true all the time. GTK is
currently equivalent to Qt 1.1, which was released in about Feb 97. There
are also many specialized, high-level widgets avaible for GTK: xmhtml-gtk,
a 3.2 HTML complient widget supporting tables/frames, the GtkTerm widget
which is a terminal widget. GTK can be bound to any language which can
use C shared libs, which is about all of them. GTK doesn't require the
moc compiler for it's widget signals (although I don't consider the moc
compiler a problem, but it's still a little annoying).
GTK also has some advantages over Qt in it's object-oriented design.
All GTK object methods are virtual, GTK signals, and overrideable on a
instance basis.
Here's an example: Let's say you wanted to create a button which had a
pixmap in and text in it. Normally, when you press the button it sends
out it's "clicked" signal. But in this button, when you click the pixmap,
you don't want it to send out it's clicked signal, you want it to togle
showing two different lines of text within the button. To impliment this
in Qt, you would have to inherit the button, override the
button_press_event, check for the click on the pixmap, and either change
the text or pass the event down to the button level. So, what's wrong
with this? Well, for one thing you only use the button once, so it's alot
of effort for just one button. The other thing is you have to come up
with a reasonable name for your new button hack. You don't want to come
up with a name for your new button. It's a stupid little button. Half an
hour later you name it MyStupidButton in frustration. Two days later you
think of a reasonable name, and go back and change it. In GTK, all member
functions are signals! You can override the button_press_event for your
one button after creating with a simple gtk_signal_connect (object,
"button_press_event", new_function_pointer). Done.
I wouldn't worry about a comming Qt/GTK GNOME/KDE war. We're working
together as much as possible. It's also quite possible Qt will have to
LGPL it's libraries (or at least one version of them) to compete with GTK.
Regards,
Jay Painter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]