QWebEngineView去除自带Cookie

版权声明:未经博主允许,禁止转载 https://blog.csdn.net/Think88666/article/details/84399295

目前遇到一个场景,就是使用QWebengineView但是不需要保存cookie的情况,每次启动程序都会清空一下cookie,具体的操作如下:

 QWebEngineCookieStore *cookie = webView->page()->profile()->cookieStore();
 cookie->deleteAllCookies();

参考了:
    https://blog.csdn.net/best_zyj/article/details/78996172 

猜你喜欢

转载自blog.csdn.net/Think88666/article/details/84399295
今日推荐