0
WebEngineProfile{
    id:weProfile;
    cachePath: cppApp.currentDir()+'/cache';
    persistentCookiesPolicy:WebEngineProfile.ForcePersistentCookies;
    persistentStoragePath:cppApp.currentDir()+'/storage';
}

This is the settings of my profile. I have created both the "cache" folder and "storage" folder, and cppApp.currentDir() returns the current directory.

I have also set the profile of WebEngineView in QML

profile:weProfile;

These directory settings did not achieve the expected effect, and there were no caches or cookies present in these two directories. However, there is a difference between not using a profile. Without a profile, cookies will be recorded (although they are in another folder), but with this profile, cookies will never be recorded.

I don't know where I made a mistake. I tested this on ubuntu 22.04 with qt version 5.15.3, and on win10 with qt version 5.15.2

I have tried adding

offTheRecord: false;
storageName: "xxx";
httpCacheType: WebEngineProfile. DiskHttpCache;

to the profile. But none of these works.

popkc
  • 106
  • 3
  • 2
    https://bugreports.qt.io/browse/QTBUG-108044 Apparently, with Qt 5.13.0 default value of offTheRecord is changed from false to true. – iam_peter Jul 03 '23 at 12:40
  • @iam_peter thank you! After adding both offTheRecord and storageName, it's OK. I think I didn't add them together before. – popkc Jul 04 '23 at 01:37

0 Answers0