[PyQt] QWebEngineUrlRequestInterceptor doesn't work

Florian Bruhin me at the-compiler.org
Tue Jul 12 18:18:56 BST 2016


* redstone-cold <redstone-cold at 163.com> [2016-07-13 01:15:46 +0800]:
> So if Qt does not has ownership of the interceptor , and  the
> interceptor isn't referenced by Python , then it is garbage
> collected, Right ?

Correct.

> BTW, if we assign a parent to the interceptor(e.g.
> WebEngineUrlRequestInterceptor(profile)), then it is owned by Qt,
> therefore won't be garbage collected. I tested it!

Oh, right, that works as well. I usually try to always set a parent
for long-lived things.

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160712/32f02d3d/attachment.sig>


More information about the PyQt mailing list