You have to subclass cookie class, create Cookie and QNetworkAccesManager and connect them to your web vew.
//So lets create 2 web views, cookie and NAM
#include <QNetworkAccessManager>
#include <QNetworkCookieJar>
cookie1= new Cookie(this);
acmngr= new QNetworkAccessManager(this);
web1= new QWebView(this);
web2= new QWebView(this);
cookie1->load();
web1->page()->setNetworkAccessManager(acmngr);
web1->page()->networkAccesAanager()->setCookieJar(cookie1);
web2->page()->setNetworkAccessManager(acmngr);
web2->page()->networkAccesAanager()->setCookieJar(cookie1);
//So lets create 2 web views, cookie and NAM
#include <QNetworkAccessManager>
#include <QNetworkCookieJar>
cookie1= new Cookie(this);
acmngr= new QNetworkAccessManager(this);
web1= new QWebView(this);
web2= new QWebView(this);
cookie1->load();
web1->page()->setNetworkAccessManager(acmngr);
web1->page()->networkAccesAanager()->setCookieJar(cookie1);
web2->page()->setNetworkAccessManager(acmngr);
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!)
Bookmarks