DBus Qt bindings

Peter Hawkins peter@hawkins.emu.id.au
Wed, 28 Jan 2004 12:34:48 +1100

On Mon, 26 Jan 2004 12:37 pm, you wrote:
> On Sunday 25 January 2004 20:14, you wrote:
> > Did you ever actually succeed in making the code that is there work?
> > Or was it still under development?
> It's under development but it's already working fine. I know people who
> are actually already using it.

(Also CC'ing the list since I have finally been able to subscribe)

The qt code in CVS does not compile or link at the moment:
i) qt/message.cpp needs a #include <cstdlib> since it uses malloc()
ii) The dbus qt library has no implementation of Connection::virtual_hook(), 
so it cannot be linked against. As I understand it this should just be a 

What I'm really after is a Qt version of the glib interface function 
I am not interested in actually using dbus from C++ with Qt myself, rather I 
am trying to make dbus's python bindings work in the same script as a PyQt 
interface. This currently does not work due to the need for two event loops.

My first approximation to this is:
extern "C" {
void dbus_connection_setup_with_qt_main (DBusConnection *connection)
	// FIXME: actually store the integrator somewhere and dispose of it as
        // necessary =)
        new DBusQt::Internal::Integrator(connection, NULL);

Unfortunately this doesn't seem to work - I tried a modified version of 
tools/dbus-monitor using this function and a QApplication but no messages 
seem to be delivered. My suspicion is that dbus_connection_dispatch() is not 
being called.

Any suggestions?