[KLUG Programming] gui c++ programming

Adam Williams programming@kalamazoolinux.org
Tue, 11 Nov 2003 11:18:45 -0500


> I looked through the beginning programming manuals for both this weekend
> and found them very similar but very different.  Both are c++ toolkits,
> gtkmm is really a wrapper for gtk+ so there can sometimes be a slight
> lag between a new feature in gtk and when it can be used in gtkmm.  qt
> is mature because of the developer base and user base of kde.  qt
> integrates well with the ide kdevelop.  I have yet to try an ide with
> gtkmm.  (I tried a full mdi autocreate in kde and it would not compile
> on my RH9 though) small qt projects compile simlply with qmake and

Other that QT version hell I've also found QT apps & examples relatively
easy to compile.  Between major versions 1, 2, (now 3?) they changed
several "important" things as I recall,  but nothing I had broke -
although getting them to find the right libraries/headers was fun.

> make.  gtkmm I will need to learn automake and autoconf which I was not
> looking to do but may be a good thing to learn in the long run.  gtkmm

I don't think this is true.

Sure you've got things like 

g++ simple.cc -o simple `pkg-config gtkmm-2.0 --cflags --libs`

this makes use of automake, etc.. but it doesn't really require you to
learn them.  In fact is serves the exact purpose of avoiding the agony
I've had getting different versions of Qt apps to compile, since it
automatically expands to be the -I/-L parameters neccesary to
include/link the given version of the specified package.

> has library projects to integrate with glade and that is my next thing
> to try.  gtkmm also has libraries to interface with gnome and bonobo but
> I am unsure at the advantages of this yet because I have not read up on
> gnome and bonobo features.  

I have a presentation on this scheduled in 2004.  I think the advantages
are pretty significant - but primarily if your interested in using
existing work or integrating with another application (Evo, OO,
etc...).  Not to mention very good database access via GNOME-Db, etc...
whereas in Qt you'd have to link out to native unixODBC or some such
(not that that is particularly hard, just less elegant than something
that all uses the same object model).

Of course, GNOME stuff isn't cross platform (at least not on Win32
anyway).

> If I were to release a project using gtkmm,
> I would be expecting anyone that uses it to compile 6 different
> libraries.  Yuk and what a pain.  Is gtkmm distributed with ximmian? 

Not in the current version.  But good rpms are available from freshrpms.

> I'm just looking for comments.  Both are cross platform and will compile
> on win32.  Have not done yet though. 
> My big issues no matter which I choose are the available tools and
> documentation for c++ tools available today.  String libraries and
> docs.  Network libraries and docs.  ODBC libraries and docs.  Postgres

The unixODBC is natively compatible with the Win32 ODBC API.  If you
want cross-platform database access that is definetly the way to go.

But I'd at least take a moment to look at Mono C#/Gtk#;  depending on
how low level your problem is that might be a simpler route in the long
run.

> libraries and docs.  If I create a multi platform project all used
> libraries will have to be available on both platforms.  Which is the
> mailing list I should get on besides the obvious qt or grkmm ones for
> c++.  Which website has the best info.  I'm just looking for comments.
> I'm looking to do some programming to interface with databases.  Most
> likely postgres.  Assume cross platform would have to be ODBC.

Win32 PgSQL libraries exist,  but I think ODBC is just easier - and you
just learn one API forever.