libpurple with Qt

Ethan Blanton elb at
Wed Jul 18 20:20:55 EDT 2007

bunjee spake unto us the following wisdom:
> I'd like to develop a Qt based UI using lib purple.


> Since Qt has it's own event loop, I cannot use the blocking
> "g_main_loop_run".
> Is there a way to have a non blocking callback based loop with glib?
> Do I have to recode my Qt <-> libpurple own interface ?

This is probably your best bet, and it's not really hard at all.  All
you need to do is provide appropriate functions via a
PurpleEventLoopUiOps (basically, just functions to provide timeouts
and select() on filedescriptors), and call
purle_eventloop_set_ui_ops().  See eventloop.{c,h} for details.

> Has anybody ever did that ?

qpe-gaim had something related to Qt as an event loop, but I'm not
clear on the whole story there.  You might be able to lift much of the
event code right out of that.


The laws that forbid the carrying of arms are laws [that have no remedy
for evils].  They disarm only those who are neither inclined nor
determined to commit crimes.
		-- Cesare Beccaria, "On Crimes and Punishments", 1764
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <>

More information about the Devel mailing list