Results 1 to 2 of 2

Thread: How to use anonimous proxy with QWebFrame.load

  1. #1
    Join Date
    Mar 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question How to use anonimous proxy with QWebFrame.load

    Hi to all,

    i'm new to the forum and i'm a PyQt user.

    My question is pretty conceptual, i need just an hint because i'm stuck on that.

    I want to fetch an URL with QWebPage passing by a web anonimous proxy.

    Using directly QWebPage.mainFrame().load(QUrl) works without problems.

    If I try to set proxy with these methods (it's python but it's pretty easy to understand for C++ users ):

    Qt Code:
    1. #setting up the proxy
    2.  
    3. proxy = QNetworkProxy()
    4. proxy.setHostName("189.75.98.199") #just examples
    5. proxy.setPort(1111)
    6. proxy.setType = QNetworkProxy.HttpProxy
    7.  
    8. #setting the manager
    9.  
    10. manager = QNetworkAccessManager()
    11. manager.setProxy(proxy) #setting the proxy on the manager
    12.  
    13. #setting the proxy as application proxy
    14.  
    15. QNetworkProxy.setApplicationProxy(proxy) #seems to do nothing..
    16.  
    17. #web page
    18.  
    19. webpage = QWebPage()
    20. webpage.setNetworkAccessManager(manager) #maybe.. but it doesn't work
    21.  
    22. webpage.mainFrame().load(QUrl("http://www.foo.bar") )
    To copy to clipboard, switch view to plain text mode 

    the QWebPage does the request ignoring my proxy, always directly.

    What's wrong? I'm using in a wrong way my proxy? Or is it a conceptual problem?


    Thanks
    Last edited by avastreg; 25th March 2011 at 09:02.

  2. #2
    Join Date
    Mar 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to use anonimous proxy with QWebFrame.load

    nobody? is it possible with an anonimous proxy?

Similar Threads

  1. Replies: 0
    Last Post: 30th December 2010, 02:04
  2. qwebframe - scrolling to a specific position
    By boast in forum Qt Programming
    Replies: 1
    Last Post: 15th June 2010, 02:20
  3. Problem with loadFinished signal from QWebFrame
    By s87 in forum Qt Programming
    Replies: 0
    Last Post: 19th April 2010, 11:24
  4. QWebFrame evaluateJavaScript
    By bunjee in forum Qt Programming
    Replies: 2
    Last Post: 2nd September 2009, 07:55
  5. QWebFrame scroll down to the max.
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 28th August 2009, 22:55

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.