QWebEngineHistoryModel — PyQt Documentation v6.9.0 (original) (raw)

PyQt6.QtWebEngineCore.QWebEngineHistoryModel

Inherits from QAbstractListModel.

Description

A data model that represents the history of a web engine page.

The QWebEngineHistoryModel type exposes the title, url, icon, and offset roles. The title, url and icon specify the title, URL, and favicon of the visited page. The offset specifies the position of the page in respect to the current page (0). A positive number indicates that the page was visited after the current page, whereas a negative number indicates that the page was visited before the current page.

This type is uncreatable, but it can be accessed by using the itemsModel(), backItemsModel(), forwardItemsModel() methods.

Enums

Roles

This enum describes specific roles, which history data model supports.

Member Value Description
IconUrlRole 259 Favicon of the visited page
OffsetRole 258 The offset of the page in respect to the current page (0)
TitleRole 257 Title of the visited page
UrlRole Qt::UserRole URL of the visited page

Methods

data(QModelIndex, role: int = DisplayRole) → Any

TODO


reset()

TODO


roleNames() → dict[int, QByteArray]

TODO


rowCount(parent: QModelIndex = QModelIndex()) → int

TODO