本文整理汇总了Python中PyQt4.QtWebKit.QWebSettings.clearMemoryCaches方法的典型用法代码示例。如果您正苦于以下问题:Python QWebSettings.clearMemoryCaches方法的具体用法?Python QWebSettings.clearMemoryCaches怎么用?Python QWebSettings.clearMemoryCaches使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtWebKit.QWebSettings
的用法示例。
在下文中一共展示了QWebSettings.clearMemoryCaches方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: show_graph
# 需要导入模块: from PyQt4.QtWebKit import QWebSettings [as 别名]
# 或者: from PyQt4.QtWebKit.QWebSettings import clearMemoryCaches [as 别名]
def show_graph(self):
GeosismaWebForm = 'GeosismaSchedaAgibilita.html'
template_path = os.path.dirname(os.path.realpath(__file__))+'/template/'+GeosismaWebForm
# create webview clearing cache
# js-python connector is insude WebView Class
self.dlg = GeosismaOfflineDlg()
#self.web = WebPage()
# load content
QWebSettings.clearMemoryCaches()
self.dlg.ui.webView.load(QUrl(template_path))
self.dlg.show()
示例2: reset_browser
# 需要导入模块: from PyQt4.QtWebKit import QWebSettings [as 别名]
# 或者: from PyQt4.QtWebKit.QWebSettings import clearMemoryCaches [as 别名]
def reset_browser(self):
"""
This function clears the history and resets the UI.
It's called whenever the inactivity filter times out,
Or when the user clicks the "finished" button when in
'reset' mode.
"""
# Clear out the memory cache
QWebSettings.clearMemoryCaches()
self.browser_window.history().clear()
# self.navigation_bar.clear() doesn't do its job,
#so remove the toolbar first, then rebuild the UI.
debug("RESET BROWSER")
if self.event_filter:
self.event_filter.blockSignals(True)
if self.screensaver_active is True:
self.screensaver_active = False
self.disconnect(self.event_filter, SIGNAL("activity"), self.reset_browser)
if self.event_filter:
self.event_filter.blockSignals(False)
if hasattr(self, "navigation_bar"):
self.removeToolBar(self.navigation_bar)
self.build_ui(self.options, self.configuration)
示例3: clear_caches
# 需要导入模块: from PyQt4.QtWebKit import QWebSettings [as 别名]
# 或者: from PyQt4.QtWebKit.QWebSettings import clearMemoryCaches [as 别名]
def clear_caches():
QWebSettings.clearMemoryCaches()