[Qtwebengine] QWebChannel question

Milian Wolff milian.wolff at kdab.com
Sun Mar 12 14:28:14 CET 2017


On Freitag, 10. März 2017 06:31:47 CET Greg Hellings wrote:
> I'm working with an embedded QWebEngineView widget through which I'm
> connecting by means of QWebChannel. The documentation for
> QWebChannel::registerObject includes the following text "*Note: *A current
> limitation is that objects must be registered before any client is
> initialized.".
> 
> Does anyone happen to know if there are efforts to remove that limitation?

As the QWebChannel maintainer, I'm not aware of any effort to remove this 
limitation.

> Is there significant difficulty in removing that limitation, or has there
> simply been no demand for it, so no effort has been put into removing it?

Exactly this, no demand and it simplified things. But note that the webchannel 
nowadays can cope with dynamic registration to some degree internally already 
- namely when it encounters a new QObject as a return value, or signal 
argument, or property value.

> Is it something that would be open and accessible to a newcomer to
> contribute if there is a market for it?

See above: The basis should be there already, patches welcome to use that for 
supporting registration of new clients later on. Note that you'll also have to 
deal with deregistration, which you can probably handle like a "destroyed" 
event on the JavaScript side.

Cheers

-- 
Milian Wolff | milian.wolff at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5903 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20170312/492c7b4a/attachment.bin>


More information about the QtWebEngine mailing list