[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Emiting signals from threads
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2003-12-27 18:12:29
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Saturday 27 December 2003 16:21, Daniel Martin Lambea wrote:
> > I have written a low-level FTP class and to use it in a non-blocking
> > way, i wraped it in a QThread. Everything works fine, but now, the ftp
> > class emits a signal, on which a certain dialog must be displayed to the
> >  user - but since the slot will be executed in thread context i can't do
> >  any GUI manipulation. So what should i do ?
>
>   You can set a variable in the thread's owner. If you monitor that flag
> from the main context, you can manipulate the GUI freely.

You can also post a  custom event to one of your classes.
The event will be processed in the context of the event loop thread.

Cheers,
Kevin

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic