IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QWebEngineHistoryModel Class

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

This class was introduced in Qt 6.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QWebEngineHistoryModel Class

  • Header: QWebEngineHistoryModel

  • Since: Qt 6.2

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)

    target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)

  • qmake: QT += webenginecore

  • Inherited By:

  • Instantiated By: qml-qtwebengine-webenginehistorymodel.xml

  • Inherits: QAbstractListModel

Detailed Description

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 QWebEngineHistory::itemsModel, QWebEngineHistory::backItemsModel, QWebEngineHistory::forwardItemsModel methods.

See Also

Member Type Documentation

 

enum QWebEngineHistoryModel::Roles

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

Constant

Value

Description

QWebEngineHistoryModel::UrlRole

Qt::UserRole

URL of the visited page

QWebEngineHistoryModel::TitleRole

257

Title of the visited page

QWebEngineHistoryModel::OffsetRole

258

The offset of the page in respect to the current page (0)

QWebEngineHistoryModel::IconUrlRole

259

Favicon of the visited page

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+