From kde-devel Sat Dec 27 18:12:29 2003 From: Kevin Krammer Date: Sat, 27 Dec 2003 18:12:29 +0000 To: kde-devel Subject: Re: Emiting signals from threads X-MARC-Message: https://marc.info/?l=kde-devel&m=107254889332695 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0601750870==" --===============0601750870== Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_Nuc7/I+KXvzXTd6"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit --Boundary-02=_Nuc7/I+KXvzXTd6 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Description: signed data Content-Disposition: inline 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 --Boundary-02=_Nuc7/I+KXvzXTd6 Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQA/7cuNnKMhG6pzZJIRAj/7AJ4+NmW7QuBHG6DhA8bx+6CfxZrrGQCeNbhA +DwIzFBIDhm7zTYqAgW60aQ= =gyar -----END PGP SIGNATURE----- --Boundary-02=_Nuc7/I+KXvzXTd6-- --===============0601750870== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============0601750870==--