[SOLVED] QWebView behaviour with JavaApplet through a SOCKS-Proxy
There is a following problem:
I created a Qt-application with QWebView based on Qt 4.8.2
The application should load some java applet (please, don't ask me for what)
It functions well, but as long as not used a proxy
the proxy has no authorisation and was set with
after this the QWebView instance will be created
with wireshark I can observe that the initial page request with applet tag goes through the proxy
after JVM starts all other load requests go direct and in the Java console the request have "proxy=DIRECT"
if the proxy is set in jcontrol it functions again, but it is not the way I wish
What did I wrong and how it could be fixed?
Do I need newest Qt-Version?
Thank you for your advices.
The problem was solved after I spent a couple of day on it...
I had a hope there are some "default" proxy factory or the proxy will be used installed by QNetworkProxy::setApplicationProxy(proxy) ... No way...
Java will be considered as a plugin!!! That is why, the QWebView needs his own QNetworkProxyFactory implementation:
- the queryProxy() should reimplemented, something like that
@class SystemProxyFactory : public QNetworkProxyFactory
virtual QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query)
ret << QNetworkProxy::applicationProxy();
QNetworkAccessManager* pNAM = m_pWebView->page()->networkAccessManager();
I hope somebody it helps...