[PyQt] QWebView and https
David Boddie
dboddie at trolltech.com
Thu May 27 16:41:08 BST 2010
On Thu May 27 15:59:35 BST 2010, alanm wrote:
> Well, despite no replies I haven't given up. What I've found is that I'll
> need to create my own class based on QNetworkAccessManager and override the
> sslErrors() method. Here's the class I am trying:
[...]
> Now what I don't understand is how to make my QWebView use this class. I
> know that QWebPage has a setNetworkAccessManager() method, but I've tried
> various ways to connect these bits and nothing works yet.
>
> Do I have to subclass QWebPage or QWebView ?
You should just be able to set the network access manager on the QWebPage
returned by the QWebView's page() method. I don't know if this will do
everything you need.
I'm curious about the need to subclass QNetworkAccessManager. I would have
thought that simply connecting the sslErrors signal to a slot and calling
the ignoreSslErrors() method of the QNetworkReply object passes to it would
do what you need. Reimplementing the sslErrors signal in a subclass may not
work as you might expect.
David
More information about the PyQt
mailing list