Note that there are some explanatory texts on larger screens.

plurals
  1. POPyQt + QtWebkit behind a proxy
    primarykey
    data
    text
    <p>I'm writing a PyQt (Python bindings for the all-powerful Qt library) application and a small part of my application needs a web browser (hint, OAuth). So I started using QtWebkit, which is fantastic by the way. The only hitch is I would like to allow users behind a proxy to use my application.</p> <p>I have read about the QNetworkProxy class in the QtNetwork package and figure it should do the trick. The only problem is when I create and apply the proxy, it works just fine over HTTP, but when I pass it a HTTPS (SSL) URL, it gives me the following errors:</p> <pre><code>QSslSocket: cannot call unresolved function SSLv3_client_method QSslSocket: cannot call unresolved function SSL_CTX_new QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function ERR_get_error QSslSocket: cannot call unresolved function ERR_error_string </code></pre> <p>Note: when I run...</p> <pre><code>QtNetwork.QSslSocket.supportsSsl() </code></pre> <p>.. it returns false. So that's proof of my problem.</p> <p>Here's my main code (it's right before my creationg of my QApplication):</p> <pre><code>proxy = QtNetwork.QNetworkProxy() proxy.setType(QtNetwork.QNetworkProxy.Socks5Proxy) proxy.setHostName('localhost'); proxy.setPort(1337) QtNetwork.QNetworkProxy.setApplicationProxy(proxy); </code></pre> <p>I got the code from <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qnetworkproxy.html" rel="nofollow noreferrer">here</a> but the example was written in C++, not Python so I'm not quite sure if I translated it properly. That could be the problem.</p> <p><strong>EDIT:</strong> I've tried it over a SOCKS5 and an HTTP proxy and they both throw the same error.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload