• PySide 模块
  • PySide.QtWebKit
  • 内容表

    上一话题

    QWebPluginFactory.Plugin

    下一话题

    QWebPage

    QWebHistoryInterface

    概要

    虚函数

    静态函数

    详细描述

    PySide.QtWebKit.QWebHistoryInterface class provides an interface to implement link history.

    PySide.QtWebKit.QWebHistoryInterface is an interface that can be used to keep track of visited links. It contains two pure virtual methods that are called by the WebKit engine: PySide.QtWebKit.QWebHistoryInterface.addHistoryEntry() is used to add urls that have been visited to the interface, while PySide.QtWebKit.QWebHistoryInterface.historyContains() is used to query whether the given url has been visited by the user. By default the PySide.QtWebKit.QWebHistoryInterface is not set, so WebKit does not keep track of visited links.

    注意

    The history tracked by PySide.QtWebKit.QWebHistoryInterface is not specific to an instance of PySide.QtWebKit.QWebPage but applies to all pages.

    class PySide.QtWebKit. QWebHistoryInterface ( [ parent=None ] )
    参数: parent PySide.QtCore.QObject

    构造新 PySide.QtWebKit.QWebHistoryInterface 采用父级 parent .

    PySide.QtWebKit.QWebHistoryInterface. addHistoryEntry ( url )
    参数: url – unicode

    Called by WebKit to add another url to the list of visited pages.

    static PySide.QtWebKit.QWebHistoryInterface. defaultInterface ( )
    返回类型: PySide.QtWebKit.QWebHistoryInterface

    Returns the default interface that will be used by WebKit . If no default interface has been set, WebKit will not keep track of visited links and a null pointer will be returned.

    PySide.QtWebKit.QWebHistoryInterface. historyContains ( url )
    参数: url – unicode
    返回类型: PySide.QtCore.bool

    Called by the WebKit engine to query whether a certain url has been visited by the user already. Returns true if the url is part of the history of visited links; otherwise returns false.

    static PySide.QtWebKit.QWebHistoryInterface. setDefaultInterface ( defaultInterface )
    参数: defaultInterface PySide.QtWebKit.QWebHistoryInterface

    Sets a new default interface, defaultInterface , that will be used by all of WebKit to keep track of visited links.

    If an interface without a parent has already been set, the old interface will be deleted. When the application exists PySide.QtWebKit.QWebHistoryInterface will automatically delete the defaultInterface if it does not have a parent.