[PyQt] QWebEnginePage API for callbacks

Andreas Pakulat apaku at gmx.de
Mon Jan 5 23:26:08 GMT 2015


Hi David,

On Mon, Jan 5, 2015 at 11:06 PM, David Cortesi <davecortesi at gmail.com>
wrote:

> In Qt5.4, the new QWebEngine interface takes account of the fact that the
> underlying Chromium engine is asynchronous. Four of the methods of
> QWebEnginePage take an argument "FunctorOrLambda" as a callback to receive
> control when the result is ready (for example, [1]).
>
> Using PyQt, I assume we can pass a Python defined function or lambda in
> this position?
>
> I'm a bit at a loss what to do following a call to such a method. What is
> the best way to "idle" until the callback comes? n.b. I don't see any
> WebEngine specific guidance at the PyQt5 doc [2].
>

I'd say just as all other callbacks in Qt (i.e. signal/slots), return
control to the qt event loop.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150106/6d8916da/attachment.html>


More information about the PyQt mailing list