[PyQt] Waiting For A Signal
Marc Thomas
jazzyflute at gmail.com
Wed May 21 15:48:57 BST 2014
On Wed, May 21, 2014 at 9:35 AM, Florian Bruhin <me at the-compiler.org> wrote:
> * 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/
>
Floran,
Thanks for the links. I was not aware my method was wrong. As the second
link suggested, I got the basic structure of the code from various people's
blogs, all of whom use essentially the same method. I will take some time
tonight to research what it will take to do it properly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140521/df96de84/attachment.html>
More information about the PyQt
mailing list