[PyQt] Waiting For A Signal

Florian Bruhin me at the-compiler.org
Wed May 21 15:35:00 BST 2014


* Marc Thomas <jazzyflute at gmail.com> [2014-05-21 08:47:44 -0500]:
> Hey Robert,
> 
> You are going to want to loop into threading. Essentially what is happening
> right now is that your main thread (GUI thread) is kicking off a process
> that runs for a while. While that process is happening, nothing else can
> happen. If you multi-thread your application, you can kick that process off
> in the background thus not locking up your GUI.
> 
> Here is an example of PyQt4 multi-threading I have written:
> http://pastebin.com/YFASwSb9
> This is good tutorial explaining the different components of
> multi-threading with PyQT:
> http://joplaete.wordpress.com/2010/07/21/threading-with-pyqt4/
> 
> Hope this helps!

From what I've read, subclassing QThread and overriding run is the
wrong way to use QThreads:

https://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/
http://blog.qt.digia.com/blog/2010/06/17/youre-doing-it-wrong/

Florian

-- 
() ascii ribbon campaign - stop html mail    www.asciiribbon.org
/\ www.the-compiler.org  | I love long mails http://email.is-not-s.ms/
Armadillo: To provide weapons to a Spanish pickle. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140521/72713465/attachment-0001.sig>


More information about the PyQt mailing list