I haven't used the QNetworkProxy objects yet, but it seems you would just subclass a QNetworkProxyFactory and implement the virtual QNetworkProxyFactory::queryProxy
The docs say to use the factory if you need fine grained control over which proxy to use for which requests. Do you have this situation, where you only want to return a proxy if its to youtube? If not, then you would just set a QNetworkProxy on the manager. On Jun 22, 2013, at 12:55 AM, iMath wrote: > I want to get the webpage source code of http://www.youtube.com/ ,but youtube > is blocked in my country ,so I decided to access it by a proxy server – > hostname : 127.0.0.1 port :8087 > > according to the documentation I think use > > void QNetworkAccessManager::setProxyFactory ( QNetworkProxyFactory * factory ) > > is a good choice for me ,but I don’t know how to associate this function with > my proxy server at all ,I googled a lot ,but found it very hard to find an > example on how to using this function ,anyone can show me how to use it on my > needs here ? > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
