1. éè¦ç» QWebSettings 设置å±æ§ QWebSettings::LocalStorageEnabled 为 true
2. è°ç¨ QWebSettings ç enablePersistentStorage æ¹æ³ã
è¿ä¸ªæ¹æ³ä¼åæ¶å¼å¯å¾å¤è®¾ç½®ï¼
This method will simultaneously set and enable the iconDatabasePath(), localStoragePath(), offlineStoragePath() and offlineWebApplicationCachePath().
示ä¾ä»£ç ï¼
webView->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
webView->settings()->enablePersistentStorage(QDir::homePath());
å
¶ä»ç设置ï¼å¦ setOfflineStorageDefaultQuota é½æ¯å¯éçã
温馨提示:答案为网友推荐,仅供参考