I wonder how to enable application cache
in a Qt
program written in python?
Asked
Active
Viewed 480 times
0

ch271828n
- 15,854
- 5
- 53
- 88
1 Answers
0
Use this code:
Remember to change the '__your_path__'
to a path you like to store the data.
settings = QWebSettings.globalSettings()
settings.setAttribute(QWebSettings.LocalStorageEnabled, True)
settings.setAttribute(QWebSettings.OfflineWebApplicationCacheEnabled, True)
settings.enablePersistentStorage('__your_path__')
If you only uses OfflineWebApplicationCacheEnabled
, it will only be of no use! Remember to use enablePersistentStorage
also.

ch271828n
- 15,854
- 5
- 53
- 88