The debian-private mailing list leak, part 1. Volunteers have complained about Blackmail. Lynchings. Character assassination. Defamation. Cyberbullying. Volunteers who gave many years of their lives are picked out at random for cruel social experiments. The former DPL's girlfriend Molly de Blanc is given volunteers to experiment on for her crazy talks. These volunteers never consented to be used like lab rats. We don't either. debian-private can no longer be a safe space for the cabal. Let these monsters have nowhere to hide. Volunteers are not disposable. We stand with the victims.

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

Re: qt license



On Fri, 31 Oct 1997, Bruce Perens wrote:

> I went through the GTK tutorial yesterday. It's really quite good. I don't
> know why anyone would be interested in Qt in contrast to GTK.

After some thought I think this deserves at least some consideration. From
the tutorial here is a stripped version of hello world (comments removed)

#include <gtk/gtk.h>

void hello (GtkWidget *widget, gpointer *data)
{
   g_print ("Hello World\n");
}

void destroy (GtkWidget *widget, gpointer *data)
{
   gtk_main_quit ();
}

int main (int argc, char *argv[])
{
   GtkWidget *window;
   GtkWidget *button;

   gtk_init (&argc, &argv);
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_signal_connect (GTK_OBJECT (window), "destroy",
                       GTK_SIGNAL_FUNC (destroy), NULL);
   gtk_container_border_width (GTK_CONTAINER (window), 10);
   button = gtk_button_new_with_label ("Hello World");
   gtk_signal_connect (GTK_OBJECT (button), "clicked",
                       GTK_SIGNAL_FUNC (hello), NULL);
   gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
                              GTK_SIGNAL_FUNC (gtk_widget_destroy),
                              GTK_OBJECT (window));
   gtk_container_add (GTK_CONTAINER (window), button);
   gtk_widget_show (button);
   gtk_widget_show (window);

   gtk_main ();

   return 0;
}          

And here is an analogous program written with Deity's C++ widget set:

bool hello(Widget *From,void *Data)
{
   cout << "Hello world" << endl;
   return true;
}

bool destroy(Widget *From,void *Data)
{
   return true;
}

int main(int,char *[])
{
   SelectLoop Loop;
   Root = XAttachDisplay(Loop);
   
   GUIWindow *window = new GUIWindow(Root);
   AddCallback(window,Nt_CloseReq,destroy);
   TextButton *button = new TextButton("Hello Word",window);
   button->BorderWidth(10);
   AddCallback(button,Nt_Action,hello);
   new DestroyOnAction(button,window);
   
   Loop.Loop();
}

The above has two defeciancies compared to GTK, 'DestroyOnAction' is a
fictitous 10 line class that might be usefull in the widget lib (GTK
thought so). The other is that layout in Deity's widget set does not yet
contain a 'grouping' widget (Deity does not require that kind of function
yet)

Now, my point is simple, GTK is nice, but it's not perfect. Compare the
GTK code with my code and you well see what I mean. GTK uses a large
number of macros to implement their OO ontop of C which makes the client
code harder to read and harder to write. The C++ Deity widgets have
no such problems.

It's a simple point, but I think it is important. GTK currently has very
limited documentation compared to what I saw when I looked at QT and looks
like it is not as easy to use as a C++ implementation.

I -really- like how GTK is designed (Deitys widget's follow an almost
identical path, even though I had no knowledge of how GTK worked till very
recently) but I highly dislike the use of a contrived OO mechanism ontop
of plain C.

Also, I really don't like how QT is designed, enough that I wouldn't want
to use it at all. If KDE hadn't already started using QT I would
discourage any sort of FreeQT project on the simple reasoning that it is
not a very good widget implementation (IMHO of course).

I hope this can at least help point out that GTK is very nice, but I think
it is possible to build much better widget libraries. [Note, I doubt I
actually intend to, Deity's widgets are in no means any competition to
GTK, mearly serve as an example]

Jason


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-private-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .