qt or gtk?

Dominic oblivious at web.de
Sat Jun 16 10:38:51 EDT 2001


Amardeep Singh wrote:

> On Sat, 16 Jun 2001, Dominic wrote:
>
> >
> >
> > Rainy wrote:
> >
> > > I want to learn python gui programming in linux. I think tk looks too ugly, so
> > > I narrowed down the choice to two main contenders, qt and gtk. Which of these
> > > has more complete and up-to-date python bindings? Are there other reasons
> > > to prefer one of these over another for python gui work?
> > >
> >
> > The QT toolkit is technically better (quality of code).
>                     ^^^^^^^^^^^ ^^^^^^
>
> care to explain why?
>

Sure. When I compared the source code of qt and gtk some time ago I
came to the conclusion (other people might think different though) that
qt's code is
1) easier to understand and
2) better structured,
3) more complete,
4) few bugs,                               |
whereas
gtk's (way of
-) emulating oo-features in c and signal/callback
looked clumsy to me. I mean all the code seemed
to be like a quick hack to me.

But I've to admit that I used gtk twice for some
programming taks at university while playing with glade.
The code worked fine, but was also very ugly then.

I also think it's ugly to code own widgets with gtk because of it's
way to emulate oo.

QT has a rich set of classes for all kind
of tasks, it's well tested and documented.
It's something which I would associate with industry quality code
or whatever term you would use for solid, well-done code.
(Because industry quality code sounds like opensource could't be good,
which is wrong.)

Last but not least it's the best get the job done in C++ on X-Windows.
(Though for python one would better use tk.)

P.S. I dislike gtk only because of technical reasons. I myself like free-software and
       open-source like python, perl, FreeBSD and Linux (which are running on my
   own computer. :-)

Ciao,
 Dominic

>
> So some time
> > has passed since I had compared them. But I do not know how good
> > or bad the bindings are. I suggest you should use the tk toolkit
> > it seems to have a good binding and comes with the standard
> > python distribution. And the TCL/TK toolkit has a high quality.
> > So TK would be best in my humble opinion, and QT second.
> > (QT is not completely free but that doesn't make it bad, actually
> > it's the best X- Toolkit for C++ programming.)
> >
> > Ciao,
> >  Dominic
> >
> >
> >
> > >
> > > --
> > > "Your password must be at least 18770 characters and cannot repeat any of your
> > > previous 30689 passwords. Please type a different password. Type a password
> > > that meets these requirements in both text boxes."
> > >                                  (Error message from Microsoft Windows 2000 SP1)
> >
> >




More information about the Python-list mailing list