Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Proxy

    General and Desktop
    2
    4
    2514
    Loading More Posts
    • 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.
    • L
      luisaguirre4984 last edited by

      Hello I am tring to connect web throug at proxy, here is my code
      @
      QNetworkProxy pr;
      QNetworkAccessManager acc;
      pr.setUser("laguirre@ivisa.com.ar");
      pr.setPassword("luis");
      pr.setHostName("baisa.ivisa.com.ar");
      pr.setPort(8080);
      pr.setType(QNetworkProxy::ProxyType::HttpProxy);
      QNetworkAccessManager acc;
      acc.setProxy(pr);
      QnetworkReply reply=acc.get(QNetworkRequest("http://googel.com.ar"));
      connect(reply, SIGNAL(finished()),this, SLOT(httpFinished()));
      connect(reply, SIGNAL(readyRead()),this, SLOT(httpReadyRead()));
      connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(updateDataReadProgress(qint64,qint64)));
      @
      And the problem is that the program left asleep when call to acc.get , what I am doing bad??
      help please,
      regards and thanks lui.

      [edit : please use @ tags for your code, Eddy]

      1 Reply Last reply Reply Quote 0
      • G
        goetz last edited by

        Can you define "left asleep"?
        Please connect to the error() signal of the reply and check whether you get any errors.

        And you did forget to call

        @
        QNetworkProxy::setApplicationProxy(proxy);
        @

        before calling the get.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • L
          luisaguirre4984 last edited by

          left asleep, I am sorry I wanted say you leave asleep, the program do not out of this line. Thanks you. I will try with SetApplicationProxy and connect the erro signal.
          Regards luis.

          1 Reply Last reply Reply Quote 0
          • L
            luisaguirre4984 last edited by

            I Connected the signal error and made setApplicationProxy but the program result do not change, it keep in the line get infinitely.
            regards luis.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post