[Kde-bindings] Qyoto: Invoking a method on the main thread

Eric Butler eric at extremeboredom.net
Fri Oct 24 20:34:02 UTC 2008


Hi again everyone,

I spoke with Richard Dale on IRC and he's looking into the QGraphicsView 
problem I asked about yesterday, but I've got another issue that I'd 
like to discuss.

I need a way to invoke a method on the Qt main thread from another C# 
thread. It looks like this is not currently possible with Qyoto.

I'm happy to help write code, but I'm not familiar with how Qt/Qyoto 
works so I'm looking for help coming up with a plan for how to implement 
this.

For comparison, GTK# offers a convenient way to do this:

Application.Invoke(delegate {
   /* Do something with the UI here */
});

http://go-mono.org/docs/index.aspx?link=M%3aGtk.Application.Invoke(System.EventHandler)

And here's the underlying C API:
http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-idle-add

Thanks!
- Eric



More information about the Kde-bindings mailing list