I tried the method:
QWebSettings* settings = QWebSettings::globalSettings();
settings->setAttribute(QWebSettings::LocalStorageEnabled, true);
auto path = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
settings->setOfflineStoragePath(path);
window.localStorage is true (not null or undefined), but when I insert an element into localStorage:
localStorage.setItem("b","isaac");
alert(localStorage["b"]);
An error has occurred and error messages in the webkit inspector console:
QuotaExceededError: DOM Exception 22: An attempt was made to add something to the repository that exceeded the quota.
source
share