Results 1 to 2 of 2

Thread: WebView and tabWidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Mar 2010
    Posts
    38
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default Re: WebView and tabWidget

    You have to subclass cookie class, create Cookie and QNetworkAccesManager and connect them to your web vew.
    Qt Code:
    1. //So lets create 2 web views, cookie and NAM
    2.  
    3. #include <QNetworkAccessManager>
    4. #include <QNetworkCookieJar>
    5.  
    6. cookie1= new Cookie(this);
    7. acmngr= new QNetworkAccessManager(this);
    8.  
    9. web1= new QWebView(this);
    10. web2= new QWebView(this);
    11. cookie1->load();
    12.  
    13. web1->page()->setNetworkAccessManager(acmngr);
    14. web1->page()->networkAccesAanager()->setCookieJar(cookie1);
    15. web2->page()->setNetworkAccessManager(acmngr);
    16. web2->page()->networkAccesAanager()->setCookieJar(cookie1);
    To copy to clipboard, switch view to plain text mode 
    After that you will be able not to lost your session in 2 different web Views!)
    Last edited by TJSonic; 21st October 2010 at 15:40.

Similar Threads

  1. webview from UI and mousepressevent
    By maston in forum Qt Programming
    Replies: 1
    Last Post: 1st September 2010, 12:58
  2. How to make webView editable?
    By isamert in forum Qt Programming
    Replies: 2
    Last Post: 14th July 2010, 09:14
  3. Webview different Win & Linux
    By wirasto in forum Qt Programming
    Replies: 1
    Last Post: 17th December 2009, 04:14
  4. WebView
    By mskzo in forum Qt Programming
    Replies: 7
    Last Post: 5th December 2008, 21:18
  5. webView
    By peace_comp in forum Qt Programming
    Replies: 1
    Last Post: 6th July 2008, 17:57

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
  •  
Qt is a trademark of The Qt Company.