QWebHistoryItem Class

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

頭: #include <QWebHistoryItem>
Since: Qt 4.4

公共函數

QWebHistoryItem (const QWebHistoryItem & other )
~QWebHistoryItem ()
QIcon icon () const
bool isValid () const
QDateTime lastVisited () const
QUrl originalUrl () const
void setUserData (const QVariant & userData )
QString title () const
QUrl url () const
QVariant userData () const
QWebHistoryItem & operator= (const QWebHistoryItem & other )

詳細描述

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

每個 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 server.
userData () The user specific data that was stored with the history item.

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

另請參閱 QWebHistory , QWebPage::history (),和 QWebHistoryInterface .

成員函數文檔編製

QWebHistoryItem:: QWebHistoryItem (const 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.

QWebHistoryItem:: ~QWebHistoryItem ()

Destroys the history item.

QIcon QWebHistoryItem:: icon () const

Returns the icon associated with the history item.

另請參閱 title (), url (),和 lastVisited ().

bool QWebHistoryItem:: isValid () const

Returns whether this is a valid history item.

該函數在 Qt 4.5 引入。

QDateTime QWebHistoryItem:: lastVisited () const

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

另請參閱 title (), icon (),和 url ().

QUrl QWebHistoryItem:: originalUrl () const

Returns the original URL associated with the history item.

另請參閱 url ().

void QWebHistoryItem:: setUserData (const QVariant & userData )

Stores user specific data userData with the history item.

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

該函數在 Qt 4.5 引入。

另請參閱 userData ().

QString QWebHistoryItem:: title () const

Returns the title of the page associated with the history item.

另請參閱 icon (), url (),和 lastVisited ().

QUrl QWebHistoryItem:: url () const

Returns the URL associated with the history item.

另請參閱 originalUrl (), title (),和 lastVisited ().

QVariant QWebHistoryItem:: userData () const

Returns the user specific data that was stored with the history item.

該函數在 Qt 4.5 引入。

另請參閱 setUserData ().

QWebHistoryItem & QWebHistoryItem:: operator= (const QWebHistoryItem & other )

賦值 other history item to this. This item and other will share their data, and modifying either this item or other will modify both instances.