Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to get the IE Proxy Settings for Qt Application?
Forum Updated to NodeBB v4.3 + New Features

How to get the IE Proxy Settings for Qt Application?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 7.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dqiyy
    wrote on 13 Mar 2012, 07:05 last edited by
    #1

    How can we get the IE Proxy Settings such as Server IP,Port, UserName, Password from the qt desktop application on windows system?
    or QNetworkProxy provide some mechisim for directy using system proxy settings?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      adnan
      wrote on 13 Mar 2012, 10:44 last edited by
      #2

      You can set proxy for the whole application, that is every request made by app will go through proxy. Use this in constructor.

      @QNetworkProxy proxy;
      proxy.setType(QNetworkProxy::Socks5Proxy);
      proxy.setHostName("proxy.example.com");
      proxy.setPort(1080);
      proxy.setUser("username");
      proxy.setPassword("password");
      QNetworkProxy::setApplicationProxy(proxy);@

      For system proxy you can use this static function
      @QList<QNetworkProxy> QNetworkProxyFactory::systemProxyForQuery ( const QNetworkProxyQuery & query = QNetworkProxyQuery() ) [static]@

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dqiyy
        wrote on 13 Mar 2012, 12:58 last edited by
        #3

        Thank you for your kingly reply, but what i am faced now is that we have a QWebkit page to access the internet from http, and our application what a settting option for user just like "using the IE's proxy setting"
        but i am not find out how to get the NTLM type poxy 's username and password such as the IE proxy setting ?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          adnan
          wrote on 13 Mar 2012, 13:33 last edited by
          #4

          I am sorry i couldn't figure out what you are trying to say. Their are lot of grammatical mistakes. Can you try again.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            adnan
            wrote on 13 Mar 2012, 13:41 last edited by
            #5

            Perhaps you may get a solution here:

            http://permalink.gmane.org/gmane.comp.lib.qt.general/38081

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mlong
              wrote on 13 Mar 2012, 14:48 last edited by
              #6

              I think what he's saying is that he wants his Qt app to "borrow" whatever settings Internet Explorer has configured for its proxy, rather than making the user reconfigure his app separately.

              I don't know of an easy way to do that, but there may be some sort of native code you could use to either query those settings, or read them from the registry directly. That's just a guess though. It's not something that Qt does natively, AFAIK.

              Software Engineer
              My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

              1 Reply Last reply
              0

              1/6

              13 Mar 2012, 07:05

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved