[PyQt] Waiting For A Signal
daitheflu at free.fr
Wed May 21 16:23:19 BST 2014
I have a very small experience with PyQt but I think QEventLoop is what you're looking for.
There is a small C++ example here : http://doc.qt.digia.com/qq/qq27-responsive-guis.html#waitinginalocaleventloop
You'll be able to easily "translate" this to Python.
I have used this method once and it worked well.
Hope it helps,
----- Mail original -----
> De: "Robert Kent" <rob at gulon.co.uk>
> À: "pyqt" <pyqt at riverbankcomputing.com>
> Envoyé: Mardi 20 Mai 2014 19:30:25
> Objet: [PyQt] Waiting For A Signal
> As the subject line of suggests, I want to wait for a signal to be
> emitted (block essentially), but I want to do this whilst keeping
> the GUI alive. I have tried both creating my own event loop and
> re-implelmenting libqxt's QxtSignalWaiter, but my signal of choice
> is never caught until after either the event loop has quit of the
> signal waiter has stopped waiting. I'm guessing this is something to
> do with the way the event loop is executed in PyQt (or I'm doing
> something very wrong ;o). Has anyone had any success or experience
> with doing this in Python (I've done it before in C++).
> Thanks, Rob
> PyQt mailing list PyQt at riverbankcomputing.com
More information about the PyQt