[PyQt] QWebEngineUrlRequestInterceptor doesn't work

redstone-cold redstone-cold at 163.com
Wed Jul 13 02:35:07 BST 2016

Surely ,  set a parent for QObject can avoid many problems , we used to talk about it too.

在2016年07月13 01时18分, "Florian Bruhin"<me at the-compiler.org>写道:

* 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 ?


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


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 --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160713/101271f1/attachment.html>

More information about the PyQt mailing list