After installing Qt-Creator, build the shipped example webkit/fancybrowser.
By default, the application doesn’t use any proxy setting even you have a
http_proxy environment variable.
First, adding QtNetwork library into the project manifest file.
fancybrowser.pro
QT += webkit network
Then, modify the source code to add QNetworkProxy class for proxy support.
#include <QtNetwork> QT_BEGIN_NAMESPACE class QNetworkProxy; QT_END_NAMESPACE int main(int argc, char* argv[]){ .... QNetworkProxy proxy(QNetworkProxy::HttpProxy, "proxy.host.com", 80); QNetworkProxy::setApplicationProxy(proxy); .... } |
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.