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

List:       pykde
Subject:    [PyQt] QWebEnginePage API for callbacks
From:       David Cortesi <davecortesi () gmail ! com>
Date:       2015-01-05 22:06:25
Message-ID: CALyzANsyv4p5z_nYi7-9mG-NOTdf8BTVaMK--Rzojr3h8hRPdg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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].

Thanks for any suggestions,
Dave Cortesi

[1] http://doc.qt.io/qt-5/qwebenginepage.html#toPlainText

[2] http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html

[Attachment #5 (text/html)]

<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].<br><div><br></div><div>Thanks for any suggestions,<br></div><div>Dave \
Cortesi<br></div><div><br>[1] <a \
href="http://doc.qt.io/qt-5/qwebenginepage.html#toPlainText">http://doc.qt.io/qt-5/qwebenginepage.html#toPlainText</a><br><br>[2] \
<a href="http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html">http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html</a><br></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