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

    上一话题

    QWebSecurityOrigin

    下一话题

    QWebHistoryItem

    QWebHistory

    概要

    函数

    详细描述

    PySide.QtWebKit.QWebHistory class represents the history of a PySide.QtWebKit.QWebPage

    PySide.QtWebKit.QWebPage instance contains a history of visited pages that can be accessed by QWebPage.history() . PySide.QtWebKit.QWebHistory represents this history and makes it possible to navigate it.

    The history uses the concept of a current item , dividing the pages visited into those that can be visited by navigating back and forward 使用 PySide.QtWebKit.QWebHistory.back() and PySide.QtWebKit.QWebHistory.forward() functions. The current item can be obtained by calling PySide.QtWebKit.QWebHistory.currentItem() , and an arbitrary item in the history can be made the current item by passing it to PySide.QtWebKit.QWebHistory.goToItem() .

    A list of items describing the pages that can be visited by going back can be obtained by calling the PySide.QtWebKit.QWebHistory.backItems() function; similarly, items describing the pages ahead of the current page can be obtained with the PySide.QtWebKit.QWebHistory.forwardItems() function. The total list of items is obtained with the PySide.QtWebKit.QWebHistory.items() 函数。

    Just as with containers, functions are available to examine the history in terms of a list. Arbitrary items in the history can be obtained with PySide.QtWebKit.QWebHistory.itemAt() , the total number of items is given by PySide.QtWebKit.QWebHistory.count() , and the history can be cleared with the PySide.QtWebKit.QWebHistory.clear() 函数。

    PySide.QtWebKit.QWebHistory ‘s state can be saved to a PySide.QtCore.QDataStream using the >> operator and loaded by using the << operator.

    PySide.QtWebKit.QWebHistory. back ( )

    Set the current item to be the previous item in the history and goes to the corresponding page; i.e., goes back one history item.

    PySide.QtWebKit.QWebHistory. backItem ( )
    返回类型: PySide.QtWebKit.QWebHistoryItem

    返回历史中在当前项之前的项。

    PySide.QtWebKit.QWebHistory. backItems ( maxItems )
    参数: maxItems PySide.QtCore.int
    返回类型:

    Returns the list of items in the backwards history list. At most maxItems entries are returned.

    PySide.QtWebKit.QWebHistory. canGoBack ( )
    返回类型: PySide.QtCore.bool

    Returns true if there is an item preceding the current item in the history; otherwise returns false.

    PySide.QtWebKit.QWebHistory. canGoForward ( )
    返回类型: PySide.QtCore.bool

    Returns true if we have an item to go forward to; otherwise returns false.

    PySide.QtWebKit.QWebHistory. clear ( )

    清零历史。

    PySide.QtWebKit.QWebHistory. count ( )
    返回类型: PySide.QtCore.int

    Returns the total number of items in the history.

    PySide.QtWebKit.QWebHistory. currentItem ( )
    返回类型: PySide.QtWebKit.QWebHistoryItem

    Returns the current item in the history.

    PySide.QtWebKit.QWebHistory. currentItemIndex ( )
    返回类型: PySide.QtCore.int

    Returns the index of the current item in history.

    PySide.QtWebKit.QWebHistory. forward ( )

    Sets the current item to be the next item in the history and goes to the corresponding page; i.e., goes forward one history item.

    PySide.QtWebKit.QWebHistory. forwardItem ( )
    返回类型: PySide.QtWebKit.QWebHistoryItem

    Returns the item after the current item in the history.

    PySide.QtWebKit.QWebHistory. forwardItems ( maxItems )
    参数: maxItems PySide.QtCore.int
    返回类型:

    Returns the list of items in the forward history list. At most maxItems entries are returned.

    PySide.QtWebKit.QWebHistory. goToItem ( item )
    参数: item PySide.QtWebKit.QWebHistoryItem

    Sets the current item to be the specified item in the history and goes to the page.

    PySide.QtWebKit.QWebHistory. itemAt ( i )
    参数: i PySide.QtCore.int
    返回类型: PySide.QtWebKit.QWebHistoryItem

    Returns the item at index i in the history.

    PySide.QtWebKit.QWebHistory. items ( )
    返回类型:

    Returns a list of all items currently in the history.

    PySide.QtWebKit.QWebHistory. maximumItemCount ( )
    返回类型: PySide.QtCore.int

    Returns the maximum number of items in the history.

    PySide.QtWebKit.QWebHistory. setMaximumItemCount ( count )
    参数: count PySide.QtCore.int

    Sets the maximum number of items in the history to count .