Hello,
I try to enable caching functionality in QWebKit but can't get it to work entirely. i use this code to enable it:
and according to the doc that should do the trick, but ... what I got is only cache for the icons, WebpageIcons.db.Code:
/** cache */ bool switch_bool = true; quint64 num = 5 * 1024 * 1024; QWebSettings::globalSettings()->enablePersistentStorage( cacheDir ); QWebSettings::globalSettings()->setMaximumPagesInCache( 3 ); QWebSettings::globalSettings()->setOfflineStorageDefaultQuota(num); QWebSettings::globalSettings()->setOfflineWebApplicationCacheQuota(num); QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, switch_bool); QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, switch_bool); QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, switch_bool); QWebSettings::globalSettings()->setOfflineStoragePath(cacheDir); QWebSettings::globalSettings()->setOfflineWebApplicationCachePath(cacheDir); QWebSettings::globalSettings()->setLocalStoragePath(cacheDir);
The directory exist (but that doesn't mater because dir. is created automatically if not exists).
I try to use this on webview->settings(), webview->page()->settings() but the end result is the same.
Win Qt 4.7.0 - 4.7.2
Any help is more then welcome
Regards
