QWebHistoryItem Class Reference

[ QtWebKit module]

The QWebHistoryItem class represents one item in the history of a QWebPage 更多...

方法


详细描述

The QWebHistoryItem class represents one item in the history of a QWebPage

Each QWebHistoryItem instance represents an entry in the history stack of a Web page, containing information about the page, its location, and when it was last visited.

The following table shows the properties of the page held by the history item, and the functions used to access them.

函数 描述
title () The page title.
url () The location of the page.
originalUrl () The URL used to access the page.
lastVisited () The date and time of the user's last visit to the page.
icon () The icon associated with the page that was provided by the 服务器。
userData () The user specific data that was stored with the history 项。

注意: QWebHistoryItem objects are value based, but explicitly shared . Changing a QWebHistoryItem instance by calling setUserData () will change all copies of that instance.


方法文档编制

QWebHistoryItem.__init__ ( self , QWebHistoryItem   other )

Constructs a history item from other . The new item and other will share their data, and modifying either this item or other will modify both instances.

QIcon QWebHistoryItem.icon ( self )

Returns the icon associated with the history item.

另请参阅 title (), url (),和 lastVisited ().

bool QWebHistoryItem.isValid ( self )

Returns whether this is a valid history item.

该函数在 Qt 4.5 引入。

QDateTime QWebHistoryItem.lastVisited ( self )

Returns the date and time that the page associated with the item was last visited.

另请参阅 title (), icon (),和 url ().

QUrl QWebHistoryItem.originalUrl ( self )

Returns the original URL associated with the history item.

另请参阅 url ().

QWebHistoryItem.setUserData ( self , QVariant  userData )

Stores user specific data userData with the history 项。

注意: All copies of this item will be modified.

该函数在 Qt 4.5 引入。

另请参阅 userData ().

QString QWebHistoryItem.title ( self )

Returns the title of the page associated with the history 项。

另请参阅 icon (), url (),和 lastVisited ().

QUrl QWebHistoryItem.url ( self )

Returns the URL associated with the history item.

另请参阅 originalUrl (), title (),和 lastVisited ().

QVariant QWebHistoryItem.userData ( self )

Returns the user specific data that was stored with the history 项。

该函数在 Qt 4.5 引入。

另请参阅 setUserData ().