[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QWebEnginePage API for callbacks
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2015-01-05 23:26:08
Message-ID: CAExHGmSmBsRhhOXsMoz4nMFjehqxLHZBd3A5D7bzuCag2V_nZQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi David,

On Mon, Jan 5, 2015 at 11:06 PM, David Cortesi <davecortesi@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

[Attachment #5 (text/html)]

<div dir="ltr">Hi David,<div class="gmail_extra"><br><div class="gmail_quote">On Mon, \
Jan 5, 2015 at 11:06 PM, David Cortesi <span dir="ltr">&lt;<a \
href="mailto:davecortesi@gmail.com" \
target="_blank">davecortesi@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div><div>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 \
&quot;FunctorOrLambda&quot; as a callback to receive control when the result is ready \
(for example, [1]).<br><br></div>Using PyQt, I assume we can pass a Python defined \
function or lambda in this position?<br><br></div>I&#39;m a bit at a loss what to do \
following a call to such a method. What is the best way to &quot;idle&quot; until the \
callback comes? n.b. I don&#39;t see any WebEngine specific guidance at the PyQt5 doc \
[2].</div></blockquote><div><br></div><div>I&#39;d say just as all other callbacks in \
Qt (i.e. signal/slots), return control to the qt event \
loop.</div><div><br></div><div>Andreas  </div></div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic