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. Help regarding QNetworkProxy

Help regarding QNetworkProxy

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 893 Views
  • 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.
  • K Offline
    K Offline
    Ketan Shah
    wrote on last edited by
    #1

    Hi,

    I am working on an application that make use of QNetworkProxy.
    My problem is whenever I call QNetworkProxy::setApplicationProxy(proxy); my application hangs for sometime and then again becomes active. If I am using "Socks5Proxy" then it hangs for a long time and if I use "HttpProxy" then it hangs for a short time.
    What could be the problem, where I may be wrong? I am calling the proxyload() function from my main class constructor,
    Below is my code,

    @
    client::client(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::client)
    {
    ui->setupUi(this);
    proxyload();
    }
    void client::proxyload()
    {
    proxy.setType(QNetworkProxy::Socks5Proxy);
    proxy.setHostName("192.168.1.57");
    proxy.setPort(1080);
    //proxy.setUser("abc");
    //proxy.setPassword("123");
    QNetworkProxy::setApplicationProxy(proxy);
    }@

    1 Reply Last reply
    0

    • Login

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