Help with Qhttp and Proxy
Hello this is my first post and perhaps there is not enough information or something wrong. First Hi!!! to all of you!!!!
I am using QT HTTP example http://doc.trolltech.com/4.0/network-http.html (QT 4.2.2) for test because I need to make something similar in my project but I always received connection refuse when it start to transfer the file. Here are the degut output:
ERROR: httpRequestStarted!
ERROR: httpRequestFinished!
ERROR: httpRequestStarted!
The thread 'Win32 Thread' (0x1550) has exited with code 0 (0x0).
ERROR: httpRequestFinished!
ERROR Descriptor: Connection refused,
But if I add to the example
m_phttp->setProxy( "x.x.x.x", 8080); it works.
I get it from my PC from registry under HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet Settings but how I can know that this value is needed? And how I can get it from whatever user because I needed that my SW be used in different user PC with different settings in their PC?
Thanks a lot
Katukina
Re: Help with Qhttp and Proxy
Please can someone help me?
Re: Help with Qhttp and Proxy
You can use QSettings to look this value up in the registry.
Re: Help with Qhttp and Proxy
Hello
Thanks for your reply but my question is When I need to look for that value in the registry? Always and if it has value uses SetProxy or when I have to uses Setproxy? Is not other way to know if proxy are needed?
Br katukina
Re: Help with Qhttp and Proxy
The value you mention is a system value thus you have to query your system for it if you want to be aware of it. This means you have to use system calls to do that. In theory you could use QNetworkProxy but I never used that class and have no way of testing it in my environment as I don't use such proxies.
Re: Help with Qhttp and Proxy
Ok I will try both of them. Uses system calls and to study the QNetworkProxy class.
Thanks Katya