Qt中清除QWebEngineView缓存问题

Qt WebEnigeView缓存的清除

QWebEngineProfile* engineProfile = webEngineView->page()->profile();
engineProfile->clearHttpCache();

QWebEngineCookieStore* cookie = engineProfile->cookieStore();
Cookie->deleteAllConkies();

Qstring cacePath  = engineProfile->cachePath();
Qdir cachePathDie(cachePath);

If(cachePathDir.exists())
{
	bool rlt=cachePathDie.rmdir(cachePath);
	If(!rlt)
	{
		删除缓存目录失败!
	}
}

版权声明:本文为RDC01原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。