QWebEngineHistory¶
The
QWebEngineHistory
class represents the history of a web engine page. More…
Synopsis¶
Functions¶
def
back
()def
backItem
()def
backItems
(maxItems)def
canGoBack
()def
canGoForward
()def
clear
()def
count
()def
currentItem
()def
currentItemIndex
()def
forward
()def
forwardItem
()def
forwardItems
(maxItems)def
goToItem
(item)def
itemAt
(i)def
items
()
Detailed Description¶
Each web engine page contains a history of visited pages that can be accessed by
history()
.The history uses the concept of a current item , dividing the pages visited into those that can be visited by navigating back and forward using the
back()
andforward()
functions. The current item can be obtained by callingcurrentItem()
, and an arbitrary item in the history can be made the current item by passing it togoToItem()
.A list of items describing the pages that can be visited by going back can be obtained by calling the
backItems()
function; similarly, items describing the pages ahead of the current page can be obtained with theforwardItems()
function. The total list of items is obtained with theitems()
function.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
itemAt()
, the total number of items is given bycount()
, and the history can be cleared with theclear()
function.
QWebEngineHistory
‘s state can be saved to aQDataStream
using the >> operator and loaded by using the << operator.See also
- class PySide2.QtWebEngineWidgets.QWebEngineHistory¶
- PySide2.QtWebEngineWidgets.QWebEngineHistory.back()¶
Sets the current item to be the previous item in the history and goes to the corresponding page; that is, goes back one history item.
See also
- PySide2.QtWebEngineWidgets.QWebEngineHistory.backItem()¶
- Return type:
Returns the item before the current item in the history.
- PySide2.QtWebEngineWidgets.QWebEngineHistory.backItems(maxItems)¶
- Parameters:
maxItems – int
- Return type:
Returns the list of items in the backwards history list. At most
maxItems
entries are returned.See also
- PySide2.QtWebEngineWidgets.QWebEngineHistory.canGoBack()¶
- Return type:
bool
Returns
true
if there is an item preceding the current item in the history; otherwise returnsfalse
.See also
- PySide2.QtWebEngineWidgets.QWebEngineHistory.canGoForward()¶
- Return type:
bool
Returns
true
if we have an item to go forward to; otherwise returnsfalse
.See also
- PySide2.QtWebEngineWidgets.QWebEngineHistory.clear()¶
Clears the history.
- PySide2.QtWebEngineWidgets.QWebEngineHistory.count()¶
- Return type:
int
Returns the total number of items in the history.
- PySide2.QtWebEngineWidgets.QWebEngineHistory.currentItem()¶
- Return type:
Returns the current item in the history.
- PySide2.QtWebEngineWidgets.QWebEngineHistory.currentItemIndex()¶
- Return type:
int
Returns the index of the current item in history.
- PySide2.QtWebEngineWidgets.QWebEngineHistory.forward()¶
Sets the current item to be the next item in the history and goes to the corresponding page; that is, goes forward one history item.
See also
- PySide2.QtWebEngineWidgets.QWebEngineHistory.forwardItem()¶
- Return type:
Returns the item after the current item in the history.
- PySide2.QtWebEngineWidgets.QWebEngineHistory.forwardItems(maxItems)¶
- Parameters:
maxItems – int
- Return type:
Returns the list of items in the forward history list. At most
maxItems
entries are returned.See also
- PySide2.QtWebEngineWidgets.QWebEngineHistory.goToItem(item)¶
- Parameters:
Sets the current item to be the specified
item
in the history and goes to the page.
- PySide2.QtWebEngineWidgets.QWebEngineHistory.itemAt(i)¶
- Parameters:
i – int
- Return type:
Returns the item at index
i
in the history.
- PySide2.QtWebEngineWidgets.QWebEngineHistory.items()¶
- Return type:
Returns a list of all items currently in the history.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.