Bernhard Rosenkraenzer today
announced the initial (experimental) release of
QGtkApplication, "a class that makes it possible to embed
Gtk widgets in
Qt applications (in the
same process space, sharing the same event loop)."
Bernhard hopes that "this will be useful (primarily) in making KDE
and GNOME more interoperable (think of
embedding GNOME applets in KDE...)" but warns that this is not
particularly efficient -- either from a memory or CPU perspective.
Thanks anyway, Bernhard, we'll take it! A more full description is below.
From the README file:
What is it?
QGtkWidget and QGtkApplications are classes for combining Qt and Gtk widgets
in a single application. While this sort of thing doesn't make much sense
under normal circumstances, it can be used to help KDE and GNOME applications
interact better (think of adding GNOME control-center plugins to KControl
and vice versa).
You should probably NOT use this because "I like Qt, but Gtk has that one
great widget" - using both libraries in one application without a real need
creates huge resource requirements.
Also, the loop handing both Qt and gtk+ events is definitely not as efficient
as using just one of them.
This version is not exactly complete (see the TODO file); it's more a proof
of concept and call for fixes.
I'd like to help...
Send any patches to bero at redhat.com.
If you're looking for something to do, read the TODO file (in this directory).
There is currently no CVS tree for QGtkWidget, but setting that up is not a
problem. If you'd like CVS access, simply let me know.
There's a bug... And I need that feature...
Report any bugs (preferrably with a fix ;) ) and feature requests to
bero at redhat.com.
What platforms does it run on?
As of version 0.0.2, QGtkWidget has been tested on Red Hat Linux 7 with
Qt 2.2.3, gtk+ 1.2.8, glibc 2.2-5 and gcc 2.96-69. Chances
are it will run on most Unix-like systems with minor or no changes.
It will not compile or work on Windows. This is a feature, not a bug. :)
What license is QGtkWidget under?
Since QGtkWidget uses code from different projects, it has to be released
under a mix of 3 different licenses.
- gmain.c is under the LGPL (since it's taken from glib, with minor modifications to make it compile with a strict C++ compiler. See the included diff file for details.)
- qxembed.* is under the LGPL
- QGtkWidget.* is under the GPL. It contains some lines of code from Qt's qapplication_x11.cpp.
The example is released under the BSD license (without the advertising clause).