Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt WebKit Enabling Cookies



  • By default are cookies enabled or disabled on Qt WebKit's QWebView?

    I've seen on multiple forums to create a cookie jar and add it to the NetworkAccessManager like so:

    QNetworkAccessManager *myNam = new QNetworkAccessManager();
    myNam->setCookieJar(new QNetworkCookieJar());
    webView->setNetworkAccessManager(myNam);
    

    Does the QNetworkAccessManager take care of adding to and removing from the cookie jar or do I need to manage that? Is this all there is to it if we just want to enable cookies and not do anything fancy?


Log in to reply