[Gllug] gtk+ or Qt? (or others?)

Dave Jones davej at suse.de
Sat May 11 14:38:12 UTC 2002


On Sat, May 11, 2002 at 02:43:26PM +0100, Stig Brautaset wrote:

 > I want to learn some gui programming, and I'm wondering if anyone has
 > any opinions about what tools are nice to program in? I only know of
 > gtk+ and Qt.

For gtk, there are two excellent GTK books by New Riders.
"Beginning GTK programming" and "Gtk/Gnome programming" iirc.
They're a bit out of date, and don't cover the newer widgets etc
(especially those in the upcoming gtk/gnome release), but they're
still worth reading for learning the basics.
Qt unfortunatly, I've not seen any books at all.

 > I am starting to be able to do useful things in C, but I'm not familiar
 > with C++.

I've not seen many C++ apps that use GTK, and conversely, don't think
think I've seen any C Qt apps. There are C++ bindings for GTK,
but most people seem to just use C with OO influences.

Both toolkits have excellent tools for UI generation, (Glade for GTK,
qtdesigner for Qt). From these you can basically leave most of the
GUI frobbing code to $designer_app, and just write the functions
that happen 'when this button is clicked', or 'when this is dragged'
etc.  These save immense amounts of time, and are great for prototyping
GUIs, as well as generating final apps.

Glade (not sure about qtdesigner) can also output the GUI as an XML
file which you can then parse (with libglade iirc). This allows for
lots of funky things like allowing the user to customise your app
by editing your xml file (or loading it back into glade), so they
get a customised version of your app without ever having to rebuild
the code.

Probably surprises a few people that I'm GTK biased, working for
a distro that's inherently Qt/KDE based, but it's good to have
balance in the force I guess 8-)

    Dave.

-- 
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list